Adapt to removal of QueryDefinition::username
Allow only operation READ on QueryResults
Add tests for checks on Query{Result,Definition}s