Replace commands depending on BSD unbuffer flags

The -l for sed and -u for tr are not portable to Free Software Foundation
versions common on linux, for example ubuntu.  Using awk and fflush achieves
the same unbuffering without trying to detect which flags to use.

As a bonus this simplifies several of the nasty sed commands.
Accomodate mawk which will not fflush

On Ubuntu awk is actually mawk, which does not fflush output but will unbuffer
with an option. Detect when that option must be used here.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593504
Separate options in tests to accomodate DASH

Really weird!
Merge branch 'remove_bsd_specific_unbufferring'