nbfmt: Add --test support for easier CI integration
nbfmt: Add --test support for easier CI integration

Does not overwrite notebook. Returns status 0 or 1 to OS for scripting.

usage:
```
if nbfmt.py --test notebook.ipynb; then
  echo "notebook is formatted"
else
  echo "notebook is not formatted"
fi
```
PiperOrigin-RevId: 303851763

tensorflow/docs,tensorflow/docs,tensorflow/docs