Implement transaction.atomic wrapper for Django 1.4 compatibility