readline: Treat bare \r as a line ending

Fixes #3305

Review, plz: @bnoordhuis and/or @TooTallNate