Add missing Problem.pm package

Only used for extracting subsets of tests for a problem
currently; this ought to be converted into a DBIx::Class
wotsit eventually.
Replace judgehost dependencies on old packages

Works with the newer ones after a bit of tweaking. Mostly done by
copying the old 'dequeue' function out and working on the DBI
database handle directly instead of modifying to be a bit more
idiomatic.

TODO: modify to be a bit more idiomatic.