websocket: Reorganize structs to extract the common header part in its own type

This is to avoid breaking strict aliasing for GCC.