Add DatabaseChecker class to simplify database validation

This class is designed to make it simpler for tests to make sure
that the values in a database are as expected.