Refactor init and error handling code

Move common ffi initialization code to 'ffi::init()' and the initialization of error handling to a
a shared location.
Merge pull request #79 from jroesch/init-cleanup

Refactor code around initialization and error strings.