JSON - add specific double encoding method

previously, values were auto-boxed/unboxed
JSON - add specific long encoding method

follow up to eeeef283, fixes test breakage when long encoded as double
httpd enhancements

- add notification hooks for subclass
- add exception hook and implement in subclass
- extract server socket run loop and handle more errors
httpd enhancements + related handler/test changes

- add ability to dispose of closeable resources after responding to better
  support streaming responses
- some cleanup of unused imports, legacy hashtable use
making dir and json repository handles consistent
Merge branch 'master' into gdal