Added function to handle registering the session handler.
Added function to handle registering the session handler.

Basically, this makes it easier for people to deal with the differences
between 5.3 and 5.4, and simply to remove some boilerplate code from
projects using this.

theUniC/Stash,bankiru/Stash,localheinz/Stash,graphis/Stash,tedious/Stash,AndrewCarterUK/Stash,theUniC/Stash,csburton/Stash,csburton/Stash,bankiru/Stash,jaredtking/Stash,localheinz/Stash,graphis/Stash,andrerom/Stash,jaredtking/Stash,tedious/Stash,alawnchen/Stash,andrerom/Stash,AndrewCarterUK/Stash,alawnchen/Stash