Revert "Moved IdFactory into an object for exports."

This reverts commit 6f665541bc07793b15b38c8d6975fbb46e6aced3.
Modified SessionFactory to use IdFactory.