[#1871] Add function to extract table names from SQL statement

The function performs an EXPLAIN query with the provided statement and
parses its output looking for table names. It requires Postgres >= 9.x,
as it uses the FORMAT JSON option to get and parse a JSON objects.
 [#1871] Disallow DataStore SQL queries involving system tables

 Using the `get_table_names_from_sql` helper function before running the
 provided statement, we raise a Validation error if some of the tables
 start with `pg_`.
[#1871] Fix tests

PEP9 and skip the get table names tests if running on legacy mode.
[#1871] Fix wrong call in tests
Merge branch '1871-datastore-sql-tables-2'