Move the Query DSL to its own sub-module

This is needed in preparation of the upcoming remote-query module which also needs to use the DSL but should not depend on query module.