Fix for zero-sized content throwing off toChannelBuffer().

Also short-circuit writeTo(..) accordingly to avoid unnecessary work. This fixes an issue where 0-sized ContentLength replies (e.g. 404) would make some REST tests fail.