Allow tests to run without jsonschema

- Moved strip_ansi to utils.text, so that the test machinery can load it without loading nbformat
- Added jsonschema as a requirement for the nbformat, nbconvert and html tests
- Skipped some other tests that handle notebooks if nbformat is not importable.

See #5970.