Move task-query to its own module.

Based on https://github.com/4teamwork/opengever.ogds.models/pull/14

Closes #453.