Explicit exception chaining for db exceptions by setting __cause__ in py2

As per [ticket 17601](https://code.djangoproject.com/ticket/17601).