Add SessionFactory implementation

Summary:
Add implementation of the session factory. Also adjusted
the implementation to match to the interface.

Reviewers: #forgetit-dev, dkd-ebert

Reviewed By: #forgetit-dev, dkd-ebert

Differential Revision: https://phabricator.dkd.de/D551