Defer Readline load as long as possible (fix #1081, #1095)

Also fixes rweng/pry-rails#50 and rails/spring#244.