Created PL/pgSQL function that checks the Postgres version

Created PL/pgSQL function that checks the Postgres version. If it's 9.3 or higher, the function create the materialized views and run the tests. 
Otherwise, it mock those tests with a regular view calling *view* functions instead of *materialized_view*.