Rails 3 1.x fix session id locking and implement skip support

Backported #207 changes to Rails 3.1 branch