Making sort of results optional

For some result sets we may not need the sorting of results. Making
it configurable so that caller can decide if it needs sorting. This
is particularly useful for default implementation as it performs
a brute force search on the source array which can be sorted once
by the caller and used thereafter as it is without cost of sorting
it everytime.
Allowing search in background thread

Allowing caller to set flag to search in background. This is
particularly useful when we have a long source array in which
we are going to search, which can potentially lead to blocking
of main thread for a long time.

Have tested it in the example by setting this flag to both YES
and NO. To maintain backward compatiblity just keeping the default
value to NO.