As discussed on the Mailing list and on IRC, some backends would be greatly simplified if they stop receiving string values for non-basic types, such as dates and decimal.
This patch delegates most of the get_db_prep_* logic of these fields to backend methods (named value_to_db_something where something is date, time, decimal, etc) It also implements get_db_prep_* for basic field types to avoid leaking string values.
For Jython/zxJDBC compatibility purposes, an special check was made on Field.get_db_prep_lookup and 'year' lookup. I was not able to understand it, so I choose to introduce as few modifications as possible there. It could be a good idea to delegate that logic to the backend too, but I think a second opinion is needed.
Finally, PhoneNumberField doesn't inherits from IntegerField anymore. There was no point on such inheritance, as phones are mapped to varchar fields on every backend. Not to mention that every method declared by IntegerField was overriden by PhoneNumberField.
This was tested against mysql, postgresql, oracle and sqlite3, and didn't broke anything (that wasn't already broken on trunk, at least).