fix EOF case in `inputEqual`

Cherry-picking 8bf3e4a
Tests for iteratee.Input

Cherry-picking pull request #461 (aa201ff, 6531345)