Check style fixes
Remove unused var
Adds dot to compile templates
Don't cache regexes and avoid the _re hack
Do not expose internal implementation
Use object.keys to iterate over objects
Lock now considers the creation time and compares against a ttl so
a lock is not keep forever in case of failure.

Pending: lazy removal of expired locks.
Adds dot.js dependency
Merge pull request #214 from CartoDB/CDB-4008

TTL for template locks so they are not kept forever