Improve style and conciseness (part 12); fix safe_*

Django's TestCase class runs tests in database transactions. This has
undesirable effects on safe_save and safe_delete because MySQL (and most
other SQLs) don't support nested transactions. The solution is to have
safe_save and safe_delete use savepoints instead of transactions when
tests are running.