Patch for Review: Ticket #340

I've just attached a patch to Ticket #340 (YAML, ActiveRecord
Serialize and Date formats problem)

The bug manifests when you set a value for Date::DATE_FORMATS
[:default]. This affects the default Date.to_s behavior, and in most
cases will break Date.to_yaml since YAML requires a specific date
format.

I'm a little unhappy with the approach, since it copies a bit of code
from lib/yaml/rubytypes.rb into lib/active_support/core_ext/date/
conversions.rb. I toyed with other approaches that set a temporary
Date::DATE_FORMATS[:default] value or defined a temporary singleton
to_s method on the Date object before calling to_yaml, but I rejected
those approaches because they could fail in multi-threading scenarios
(the effects of the "temporary" changes could be seen by other
threads). It'd be great if anyone has a better way to resolve this.

Thanks

-andy