[2.0] Port Array#bsearch from MRI.