Enable user to provide they're own storage mechanism

This change allows a user to provide their own storage mechanism. This is useful, for example, on a WordPress site where the $_SESSION variable can't be used reliably, or in the case where authentication needs to happen across multiple nodes and the storage would need to use a database or another shared memory.