Return no parameters if there are no data theme or sub-theme ids

Otherwise an interminable and pointless SQL statement is issued.
Improve portability of client side javascript
Fix the Query deepcopy operation to include the vocabs and db
Fix association of parameters with data themes and sub themes

Parameters are now associated with data themes and sub themes using
*both* `narrower` and `related` concepts rather than just the former
as was previously the case.