math.binpack: make binpacking much faster by caching total weight per bin.
math.binpack: cleanup using.