Refactor BOSH abstract session and manager.