[#3711] Fix regression in query string matching

If a route is marked may_terminate, and a query string is present, in
most cases, we should match; the query route is primarily for the
convenience of _generating_ URIs via the assemble() method, and only
matches if a query string is present.

This patch adds tests that do the following:

- If the route is marked may_terminate and a query string is present,
  but there is no Query route child, match and return immediately.
- If the route is marked may_terminate, and a query string is present,
  and a Query route child is present, pass matching on to child routes.
Closes #3798
Merge branch 'gwis-remove-extra-semicolons'
Merge branch 'hotfix/3735'

Close #3735
Merge branch 'hotfix/3711' of git://github.com/weierophinney/zf2 into weierophinney-hotfix/3711
Forward #3778
Merge branch 'weierophinney-hotfix/3711' into develop