Minor refactoring as we get ready to add the OptimisticConflictChecker stuff... Added utility methods to CatalogContext. Cleaned up test case code. #132