Handle many wildcard cases.

Fixes #38 and #229.

It leaves a few outstanding issues:

* results end up nested in `value` field (tracked in #287, but could be
  solved less generally than that for 1.0)
* sorts with expressions can leave extra fields in the result (tracked in #310)
Merge remote-tracking branch 'upstream/master' into ready/38-wildcards
Remove unused (and dangerous) `map` method.
Merge pull request #311 from sellout/ready/38-wildcards

Handle many wildcard cases.