change seek sig to match posix - signed pos and result
posix seek uses signed int for pos and result. we should change the seek signature to match, particularly since negative pos is valid.
also gather the seek functionality into a shared function, and tweak behaviour to handle overflows correctly and consistently.
(+fix a couple of warnings)