Fix reverseISearch when there is no search

The original line should be kept, not emptied.
Move every handler into the big switch

The pre-switch handlers don't cascade properly. Fix this by putting them
into the big switch and using a `goto` to keep the (already read) next
input.

This fixes Tab after ctrlR, Tab after ctrlY, and ctrlY after ctrlR.