exercise-gen - make one query for all questions

Fix the exercise generation for non-root practice exercises.
Document why we would want this, why would searching by id not always work?