There was an old complaint about nullable one-to-one field cascading even when the o2o field was saved to None value before the deletion. Added an test to verify this doesn't happen. Also some PEP 8 cleanup.
Python 2.7 allows to combine several 'with' instructions.
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.