WIP: Serialize directly if there is no need to do otherwise.
So far, everything was serialized in two steps just to solve the
problem that, for variants, the signature of yet unknown length
must come before the variant "body data".
Now everything that isn't inside a variant is serialized directly.
To reduce branches and the amount of code, data is always serialized
as if it was the final step (i.e. the spec'ed format is respected);
when inside a variant, information to "re-serialize" after the
signature is done is (almost) purely an addition.