Added internal version of free for service.
Use defers for mutex unlock.
Split object creation into query prep stage.
Defer creation of service until query time.

Just save the parameters that are set on the service object,
and set them after actual service object creation.
Template support for service queries.
Unit test for service template queries.