Issue #13, #14: Fix failing units tests.

The moodle user table changes with each version, so the module's
unit tests must be able to work with all versions that it supports.
We now get all the relevant data from the database as we expect the
fetch functions to load it.  It will then be the same as the host
version of Moodle.

guest users don't have the local/mail:usemail privilege, so we set
a real user to ensure tests can find the mail when we ask for it.