Move session detection function to EDD_Session class

Take 2... Issue #2441