util: data: Make *Query classes behave like a context manager
This will allow us to return connections as soon as we are done with them,
rather than at the end of the request.
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-by: Randy Barlow <randy@electronsweatshop.com>
Reviewed-by: Howard Johnson <merlin@merlinthp.org>