Refactor testing for server

Need to split the contacts and groups testing modules in separate files, and change importing/etc so that all the tests are still run correctly.