Support PostgreSQL materialized views

The change is pretty minimal, the query used in `#table_exists?` has been expanded to include materialized views in the kinds of relations it includes in its search.

In order to share the existing view tests, I made the previous test class into a concern that is then included into separate `ViewTest` and `MaterializedViewTest` classes, the latter only if PostgreSQL is at least version 9.3. ~~The test class then uses the name of the test to determine the type of view to create and test against.~~