Support empty ping and pong packets.

According to RFC6455, Section 5.5.2 the "application data" for ping and pong packets is optional, this pull requests allows writing these packets even with empty payload.