Re-implement binary_search in C

Here is how I would do it. It works. However there I don't know of a way to raise a Python exception from a pure C function. I can trying doing the others too and C if some kind of speed-up can be achieved.

Please feel free to reject this pull request this is just a proof of concept.