Add ScalarSerializerBase.WriteScalar virtual method