Simplify/fix parsing of 'type' in REST API search

- `strpos()` expects a string and throws a warning when given
  an array.
- For consistency with the other fields, assume $_GET['type'] isn't
  an array already, and split by ' '.
- Rename from `type` to `types` to make it explicit that it's an array

I think this should be fine unless you expect urls like `type[]=someType&type[]=someOtherType`, but it seems a bit inconsistent to allow two different ways of encoding the same information.