Json library improvements.

* Allow inclusion even if json_encode is defined. This is so we can
  get access to Json::last_error_msg().
* Include line number in error message.
* Give precise offset if error is inside a string.
DocumentHelper internals: Sniff content even on explicit mimetypes.
Internal: Add Contact::apply_capability_text.

And a minor renaming.
Contact::register_by_email: Support 'roles' in input.
PaperOption: Add find_document.

Which returns objects for DTYPE_SUBMISSION/DTYPE_FINAL.
Nitlet.
Add PaperStatus, a class for taking paper rows to & from Json.

I want this for tests. Eventually it should be more useful; for instance
it should replace the current paper save path.
Add some actual tests.