Add search to Erlang shell's history

Search mode can be entered by pressing ctrl-r. Enter terms and press
ctrl-r again to search backwards, or ctrl-s to then search forward (if
you terminal doesn't eat up that one). Press enter to execute the line,
or use tab, arrow keys, or other control sequences (^D, ^K, etc.) to
exit search mode while remaining on the last found line.

The search mode is a simpler version of the one available in bash or
zsh shells.

This adds a few modes to the shell (search, on top of none and meta) in
group.erl for history search, and a few more in edlin.erl to change the
meaning of control sequences while searching.