factored out standalone SchemaVersionChecker class

This can be used in arbitrary code to check whether
the database table schema versions are up to date.