GH #771: Don't serialize empty content:

Up until now Serializers have tried to serialize() or deserialize()
everything. This seems to make sense, unless you have an empty or an
undef value.

A POST request *may* include a body but doesn't have to. It's
impossible to differ between an "undef body" and an "empty body".
Practically there is no difference.

A POST request without a body will cause a "deserialize" call when
trying to read it. Since there is no serialization format (AFAIK)
that actually serializes empty content (it will either die because
it's empty - like JSON - or quietly return empty back), sending the
deserialize() method empty content is most definitely a problem.

What we do now is check whether there is any length to the content
and then decide whether to actually call "serialize" and
"deserialize" or not.

Additionally, if there is no content we will return what we got,
so if you sent undef somehow (can't think how), you'll get undef
back. If you sent empty (more likely, such as in the case of an
empty bodied POST), you will receive empty back.
reflect changes
Merge branch 'fix/serializers-ignore-empty-content'