[1.6.x] Fixed #21146 - DatabaseCache converts expires to python value
[1.6.x] Fixed #21146 - DatabaseCache converts expires to python value

DatabaseCache uses raw cursors to bypass the ORM. This prevents it from
being used by database backends that require special handling of datetime
values.

There is no easy way to test this, so no tests added.

Backport of d5606b5763 from master

felixjimenez/django,django-nonrel/django,felixjimenez/django,felixjimenez/django,felixjimenez/django,dex4er/django,django-nonrel/django,django-nonrel/django,redhat-openstack/django,dex4er/django,django-nonrel/django,redhat-openstack/django,dex4er/django,redhat-openstack/django,redhat-openstack/django