Add halving optimization (seems to save 20%).
Make halving possible by any divisor (but only super-fast for 2/3/4, where loop unrolling occurs).
Implement arbitrary divisors in managed wrapper.