Move xQueryGenerator to MathSearch specialpage

* improve class design
* allow for choice of the MathSearch backend engine

Change-Id: I4682b0dc61c6ea3e2b1ba94303c11286783b68b3