Cleanup db unit tests

Cleaning up and re-working some of the DB tests (located in db/tests/*.sql)
Getting travis to execute the pgtap tests via pg_prove