Add full support for Python 2 using future package.

  * Use input() from future package.
  * Fix unit test cases to mock the input() from future.
  * Create a new name xprint, so that print is patchable in Python
    2.x.
  * Add future to requirements.txt.