Improved chunk generation speed, fix #305, fix floating point error bug
Chunk generation times should now be a significantly faster, and are now constant time (they were O(n) before). Fix #305, samples should now always generate, and fixed a bug where generation weights didn't add up to one because of floating point error.