Make shell ctrl-u save killed text correctly

Fix edlin to correctly save text killed with ctrl-u. Prior to this fix,
entering text into the Erlang shell and then killing it with ctrl-u
followed by yanking it back with ctrl-y would result in the yanked text
being the reverse of the original killed text.

Add a test for the fix to shell_SUITE.

(This is the same fix as in PR#416, but that PR was never completed.)