Various JSON improvements.

* imports specific to unit testing now appear in a version(unittest) block.
* A JSONWriteException was added, and JSONException is now the root.
* Made writing control characters an error, as it can break C parsers.
* Added line number support for JSONParseException messages.
* Fixed a hex escape code bug. (A binary operator typo)
* Finished parseJSON unit testing for now.