Added a template with an optional constraint.

This is a startling ommision from our set of test templates.
Make a distinction between trimmed and full versions of queries. Fixes intermine/intermine#584
Merge remote-tracking branch 'alex/i584' into beta
Merge branch 'beta' of github.com:intermine/intermine into biotestmine
Better handling of db encodings. Less verbose output.
Merge branch 'biotestmine' into jbrowse-displayer