Create hooks.r

The `.onUnload` hook will unload the shared library (see Issue #35)