Removed query() method from database classes

query() was returning a ResultSet from an executed Statement, but was not
explicitly closing the Statement (it was going out of scope) and this
causes issue with SQLite and MySQL.

It's good practice to explicitly close Statements when finished with them
(and ResultSet's too, though closing Statements also closes the ResultSet)

Also fixed a few issues with adding the genre entity to the data model and
a few broken tests