Create tests for JSONHelper

Created tests for JSONHelper, only one test per method, since this class
is extensively tests via other tests which test class which encode and
decode json data.
Merge pull request #43 from cloudant/33601_add_json_helper_tests

33601 add json helper tests
Remove deprecated API.

This includes TypedDatastore.

prepareAttachment, addAttachment, getAttachment,
attachmentsForRevision are still public but declared in the
DatastoreExtended interface. They need to be public as code from other
packages such as com.cloudant.sync.replication need to call them. The
JavaDoc in the interface makes this clear.

Also fixed a bug where attachments weren't getting properly cleaned up
under the new attachments API.
Fixup javadoc
Fix logic on purgeAttachments()
Fix comment