Fix IndexerTest

- Corrected various syntax errors
- AddFieldAndIdentifier uses the indexer object
  to add to the database instead of accessing the
  database directly
- Inserted a neat trick for IndexerIsClosed:
  The test now passes if the expected exception
  is thrown by the Indexer.
- All tests pass