Adding JSON engine

Modeled closely off of csv engine.

The python file cannot be name json.py as this conflicts with the
import of the json module.
Cleanup database connection following command line installation

Previously lib.engine.final_cleanup was only triggered by the GUI.
This change results in the CLI also triggering a final cleanup
after installing a dataset.

This has the added benefit of allowing text file based output
formats to add any necessary end of file information.
Add a disconnect method to add the final ] to the json file

Plus some other minor cleanup
Make decimal and string JSON exports work properly

1. Convert the decimals that are currently stored as strings to
   Decimal.
2. Move to simplejson since this supports Decimal.
3. Don't add quotation marks at the end of format_insert_value.
4. Don't escape quotes in strings since json/simplejson handle
   this (resulting in extra escaping.
Close out JSON files cleanly

1. Remove the trailing comma on the last entry
2. Add the final square bracket

Unfortunately this is a slightly tricky thing to do and this
requires that the entire file be read into memory again, which
could be an issue for large datasets.
Switch back to using the json module instead of simplejson

1. Switch simplejson to json
2. Convert string representations of decimals to float instead of
   Decimal

We were using simplejson to support the use of Decimal values for
exporting floats, but we don't actually need to use Decimal values
because using floats accomplishes exactly the same formatting on
export. Therefore switching back to a core module is preferable.
Use None for null values in json engine

This causes the json module to properly dump the json keyword null.
This is better than empty strings because some importers will treat
emptry strings as string values thus changing the data type for the
columns. It is better than removing the key:value pair because it
is explicit about the presence of the null.
Store JSON in a more compact representation

Most tools for working with JSON can handle the pretty display.
Merge pull request #158 from ethanwhite/json

Add a JSON engine