XD-1104: Add tests for jdbc sink module and fix bugs

Worked with @fbiville to add some tests to jdbc module. Discovered some bugs along the way.

Not sure what to do about XD-1162 though (is the problem the fact that we can't support a json map where the keys actually contain an underscore (which *is* legitimate IMO, but not sure we understand the jira correctly))