Cookies refactoring

Should be applied after #10059. 

This is a small refactoring to standardize the language we use when talking about cookies. We use `name` and `key` now. @jeremy suggested `name` would be more appropriate, and I agree if for no other reason that we're using the word `key` a lot when talking about the `key_generator`. 

This also snips :scissors: a couple blank lines below `private` to match current Rails style.