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 ' '.

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.