BUG Fix encoding of SearchForm::getSearchQuery

This made it awkward for user code to extract the query value for use in other applications; This would otherwise have to be xml decoded again.
Casting has been promoted to the templating level via `DBField::create_field` and a `SearchForm.casting` config setting.

ref: CWPBUG-153