Upgrade Cowboy to version 0.8.2

I tested as much as I could but I'm sure I missed a few things. All my manual testing works, but you'll need to confirm it works as well as it should be.

I may also have forgotten to update something as I don't know the project that well yet. Please tell me if more changes are needed.