Use Python's json module to serialize GeoJSON feature properties.

I've also made the code more efficient by eliminating redundant
function calls, using `in` tests against numerical types, only
getting a list of feature fields once. I've also deleted the
unnecessary `del` statements (you almost never have to do this in
Python) and the empty return statements. I also fixed identation.

Wish I could test this properly, but it should be functional and
hopefully helpful!
Oops, I meant json.dumps().
Fix file spacing as per pylint.
remove deprecated 'strings' import.
Provide a useful error on traceback.
further whitespace fixes; remove all trailing line space.
add back field count removed from sean's fork, fix the concatenation block's indendtation.
Add the actual exception back.
change the CSV writer to handle null values, and clean up a couple of issues (it's a start).