query: fix define/text() sql-direct processing
query: fix define/text() sql-direct processing

When a query is defined like:

  ... WHERE x = <value name="x" ... /> AND y = ...

the old code would generate (for $x = 10):

  ... WHERE x =10AND y = ...

which is obviously wrong. Prepend (and append) a space to text
during normalization if such text fragment is not first (or not
last). This may affect other queries however any wierd side effects
are not expected.

Signed-off-by: Jan Viktorin <3eab6ac54c005c4408f608556a6663b7f2abede7@fit.vutbr.cz>

BeeeOn/server,BeeeOn/server,BeeeOn/server,BeeeOn/server