Add readline support.

This includes the five public patches for 6.2, as well as our own explicit
patch that stops tab-completion from appending a space.