RedMine 6397: rewrite SplitProcLine and clean up in its file

Long over-due clean-up and reworking.
See commit comments for explanations of the various parts of the whole.

For 3.6.x, the "RedMine 6397 mitigation" commit is enough to fix Solaris's problems.
Can ``s`` get out of bounds (-1) here if a number column happens to use all available space on the left side?

(Reposting in PR instead of commit)