Add import_json; repurpose export_json.

- Repurpose `export_json` to dump the graph to a file;  `to_json` serves the old purpose of conversion to a JSON string.

- Add `import_json` as the inverse of `export_json`.

Solves #23.