issue-1019: Implemented a retry system

https://github.com/CartoDB/cartodb/issues/1019