server: compute the packet length properly in 'write'

When we switched to a single packet buffer (so we could
atomically write a response to irminsule rather than writing
first a header and then a payload), we miscalculated the
length in the header.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>