Use CDB_QueryTables to detect system tables on queries endpoint

* Adds new CartoDB::SqlParser class, removes legacy code
* Rewrites Layer#affected tables to the new SqlParser