libtracker-sparql: Add API to serialize and deserialize a TrackerResource
There's contexts in which it may be useful to transfer and handle resources as a GVariant. Add API to handle both its serialization to a GVariant, and its deserialization back to a TrackerResource.
Add a test for it too.