De-coupling calculations of line coordinates from drawing those lines

Good for code organization and testability reasons, but also will
make it easier to possibly more these calculations to web workers
in the future.
Extracting line generation functions out of RegionPainter class
Replacing if chain with hash lookup
Minor code formatting improvements
Allowing fuzziness to be set to 0