add VariantWriter
update copy-assignment constructors to give the strong exception guarantee