MDSVC: add a state struct
Fix array length checks in dalloc_value_for_key()
Add explicit deps glib-2.0

Since I couldn't figure out how to properly make use of the compiler
flags the pkg-config check for tracker-sparql sets, I simply add
a manual check for glib-2.0.
Add slrpc_open_query() implementation

Also updated
- remove typedef slq_t, use struct sl_query instead
- fix all elements names of struct sl_query
- make a connection to Tracker
- add support functions for maintaining a list of active queries