avoid private stdio fields in waitkey

Use the stdio_ext functions provided by solaris and glibc
instead of directly accessing private stdio FILE structure
members. This is needed for 64-bit solaris builds and is more
portable in general since the FILE structure is meant to be
opaque.

This is a backport of commit aac929badb5e40a59ae77ae69fc43df8f6f376fc,
without the changes to remove duplicate code.

Reviewed-on: http://gerrit.openafs.org/3257
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit aac929badb5e40a59ae77ae69fc43df8f6f376fc)

Change-Id: I2953fe9d27edb30365266b1f4372e5fd18baf06e
Reviewed-on: http://gerrit.openafs.org/9604
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>