Fix several bug found in testing
Fix several bug found in testing

I was not handling the `EXTEND_PROTOTYPES:false` setting correctly
(namely missed Ember.A and Ember.String functions).

The normal/advanced search logic was actually incorrect and I DRY'ed it
up into a util function.

sukima/ember-cli-select-picker,sukima/ember-cli-select-picker