Explain the purpose of of the 'postgres_ffi' module, explain what the PostgreSQL control file is, and some other minor cleanup.
I had copy-pasted these functions to a few other places. Clean that up, move them to a common module, and add some comments.