Fetch multiple ids all at once.

Also, silently ignoring ids that don't exist will be useful for
deleting benchmarks / queries from the database.
Store ids on benchmarks and queries.

To make this simpler, insert_benchmark and insert_query were changed
to accept just the necessary data, not the instance itself.
Allow deleting queries.

I don't want to allow deleting the example queries. For now
I'm just not storing them in the database.