Use geometry type dependent style
Fix template to work also with mapnik 2.2
Set timeout to 0 before running the queries