simplify and correct python ctypes-based wrapper

This adds python prototypes for at least one that was missing (write memory) and for the new one provided by fhunleth.

The python prototypes are greatly simplified to make maintenance less messy and difficult.