Result filtering on search (also known as Partial Search)

First take at refactoring search to allow selective results, rather than returning the whole thing.
Can we make this a little clearer? If the user encounters this error, they likely will not have the method definition in front of them, so it will not be clear which argument is bound to the `type` variable. It's also important to display the invalid argument object to the user so they can more quickly figure out what they did wrong. Messages that just say "bad input" are generally not informative enough to figure out what went wrong. Something like this would be a lot more user-friendly:

```ruby
err_msg = "Invalid search object type #{type.inspect} (#{type.class}). `type` must be a String or Symbol, like `search(:node, QUERY, [OPTIONAL_ARGS])`"
```