Removes duplicated code in query_tables_api
Merge pull request #210 from CartoDB/improve-query-tables-api

Removes duplicated code in query_tables_api