Fix support for publishing messages that have a zero-length body

The new path for short messages introduced in 27834eedc broke publishing for
messages with a content length of zero.  This commit corrects that by only
appending a body frame if we have content (which is the same as the behavior
in the longer path).

This is sort of the inverse of the issue we fixed in #10.

I would love to add a test for this, but looking at the stuff in test/ I wasn't entirely sure where to add it.