move the histogram to _bsearch.c

because it will be reused in -mpi.