Bug 998507 - add BinarySearch (r=sunfish)

--HG--
extra : rebase_source : 6ba04575a5dd8a886235e6799bc790c7a3afc64f