Move tests to functions.
Small cleanups.
Merge branch 'master' of https://github.com/jkristell/json

Conflicts:
	json-scan_test.c