implement iterative partitioning
replace npy_log2 with integer msb loop

improves performance by 10%-30% for iterative partitioning with small
regions.
make use of iterative partitioning via tuple kth in np.partition