Feature/faster cookies #scala-bug-bash

This PR makes cookie serialization significantly faster by 1) stop using `String.format` and 2) a Regex for detecting characters that need quoting. It also cleans up the use of `map` vs `foreach` when side-effecting.