freeQuery function

Free memory used by a librdf query