PostgreSQL Session handler

mostly straightforward save for some null byte weirdness in php's session_serialize