Require libedit/readline

Remove a bunch of ifdef code and fix up proper configure check for
libedit.

Fixes #1277