Allow Mac linebreaks in shell

QEMU uses Mac style newlines in its UART implementation.
This change allows Unix ("\n"), DOS ("\r\n") and Mac ("\r") style
linebreaks.
Merge pull request #565 from Kijewski/shell-mac-nl

Allow Mac linebreaks in shell