Support Rails 4.1 JSON encoding of sessions.

Continue to support marshalled sessions.