Add readline-like reverse intelligent search on ctrlR key press.

Use ctrlR to enter search mode, and then use ctrlR and ctrlS to navigate
backward and forward.