Cleaned up exception handling on the server side.

* Removed a bunch of catch-alls and added slightly more fine grained
  exception handling.
* Added logging for several errors
Improved the random questions algorithm.

* Cleaned up the imports a little to remove unused and static imports
Added support for storing arrays in database.

This function makes use of native support for arrays in PostgreSQL.
It might not be portable to MySQL or other SQL databases.

As Hibernate does not have native support for mapping array types,
a custom IntegerArrayType class implementing the UserType interface
was written to achive this functionality.
Merge pull request #12 from Ayrx/cleanup

Cleanup & Random questions