Exclude the self contact as part of the query.

This doesn't appear to have any measurable affect on query times,
whereas querying the id through QContactManager takes around 130ms
on the hardware tested.
Fix up issues with Sparql direct connection disabled.

Some compilation issues, missing optimisations and self contact
filtering.