copied _date_lookup_for_field from django 1.4

This has been removed in Django 1.5. I'm not sure if the
DateDetailView.get_object override is still necessary, since there is
no reference to which exact django bug it fixes.