Add some support for readline.

Summary: I think it would be nice to move parts of hphpd over to PHP-land, and having readline available would help with that.

Reviewed By: @ptarjan

Differential Revision: D1538831