Separate multi import
Wrap calls to ctypes functions

In some cases a redefinition of a ctypes function can cause crashes. This
makes the restype and argtypes definitions local to pyreadline. However
there may be thread safety issues.