input: don't depend on unique_fd cast to int

Also, reuse dupFd method instead of calling ::dup directly.

Test: m libinput
Test: m libinputdispatcher
Bug: 302723053
Change-Id: Ie6e4f1ea9cfc00b4c2be44dcc8922a17de129cfb
3 files changed