pu.terminal: Lean on ctype's error checking.

The module already has infrastructure for checking for errors in an
automatic way so make use of it.  Also, make use of the fact that ctypes
will automatically use byref() where needed for arguments specified as
pointers via .argtypes.