Break out common data and functions

line.go will soon have a build constraint so it doesn't compile on
unrecognized operating systems.
Add "always dumb mode" fallback

Now liner can always be used, even if the operating system in
use is not fully supported.