split poll code out of read function
move input buffer into state struct

It was allocated automatically before, but to generate input events
we'll need to keep the old state as well.
pass state to do_piuio_write, not filp