Batarray bisect

specific branch for bisect (well, bsearch now) as requested by @UnixJunkie. Some commits were merged, and tests have been added.