Configurable search output

This PR contains some fixes to master code base and some new features.

It should also work with HelloWorld and I've tried to remove all my personal stuff.

PHP scripts have an initial support for spatialite layers.