Fix XML serialization in ActiveResource to support YAML security patch

With Rails <= 3.0.19, serializing nil values would result in an XML element with a 'type="yaml"' attribute. Because of the recent security patch, this causes an error to be raised on the consumer end.

This commit applies the same fix that is going into Rails 3.0.20, but hasn't been released yet:
  https://github.com/rails/rails/pull/8853

Signed-off-by: Stephen Celis <stephen@recurly.com>
Signed-off-by: Andrew Morton <andrew@recurly.com>