fix floating point problems in searchsorted methods for range objects

Fixes #3104
* fixes `searchsortedXX` and `contains` methods
* adds unit tests