Added connection pool for SpatiaLite, improving rendering speed within one DB

- refactored PostgreSQL connection pool into generic template classes
- used the template classes for SpatiaLite connection pool
- pooled SpatiaLite connections are opened with SQLITE3_OPEN_NOMUTEX flag to allow parallel access