Add a CDB_TableMetadata table and trigger to maintain it updated

The table only contains table name and a last update timestamp.
A trigger, to be attached to tables, takes care of inserting/updating
rows in the table when the data in the subject table is changed.

The metadata table is only writable by the superuser (not the
"db owner" user). The trigger runs with the privileges of the
superuser so can always write in there, whoever performs the
insert/update operation to the trigger-equipped tables.
This is to support inserts into user tables by anonimous users.

In order to upgrade it is important to load the new functions:

 rake cartodb:db:load_functions

And refresh user triggers:

 rake cartodb:db:update_cache_trigger
Guard against infinite loop in CDB_TableMetadata_Trigger
Drop stale records in TableMetadata and improve trigger definition

Trigger definition improvements:
 - also run on DELETE actions
 - drop any previously existing trigger by the same name
Have CDB_TableMetadata_Trigger nofify cdb_tabledata_update <tabname>

Listeners could react by scheduling cache refreshes
Merge branch 'table_metadata' into develop