Total revamp of readline support.

(now using plain C bindings to readline)