Refactor|Partitioner: Reimplemented splitLineSegment()

The previous implementation was needlessly obfuscated by the lack
of temporaries and poorly chosen variable names. This new version
is much easier to follow (IMHO).