CDB-4399 Move sql generation to another file
CDB-4399 Basic implementation of the query patterns
CDB-4399 Refactor: keep ApplicationController::geocode small