Move from PAM module to shared library

PAM was caching open_session module results, causing this module to not work
as expected. Instead, PAM modules wishing to leverage the once-per-user
capability can link to this library
pkgconfig support