added binary search for collections

Added `search` method to collection prototype. automatically used by
`where` and `findWhere` when it is possible to do so.

user may provide:
- a comparison function (comparator unused)
- a value to search for (the value of the model[comparator] sought -
requires comparator to be a string)
- a model to search for (where `comparator` is a function)

Users may also request that it is the index of the model that is
returned or that the model of highest/lowest index which matches the
comparison is sought.

One point that may need to be considered is that the behaviour when a
model is input as `toFind` but the `comparator` is a string is different
from that when `comparator` is a function.