This is upstream v2.18.0 + Erlang 21 support

Also has SameSite cookie setting and {error, einval} return from a closed
socket.
Merge branch 'upstream'