Fix issues with skinny sessions

Fixes a couple of issues with the way skinny handles sessions by ensuring
sessions aren't used after being freed. Some other minor changes.

Review: https://reviewboard.asterisk.org/r/2272/


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@379582 f38db490-d61c-443f-a65b-d21fe96a405b