[python mode] Return to parent indentation level when scope is closed.

This makes it work correctly when the hanging indent is different from the indent unit.