Use encrypted cookies for sessions (bug 871850)

This is working for me locally; I'd like to try it out on dev. The biggest changes here are just to make the tests work with cookie sessions. Other than that, the big change is switching to encrypted_cookies for sessions.