update supply points whenever their associated locations change

and a bit of miscellaneous cleanup/refactor.

Fixes Case:71693 and related Case:73930.

If you read commit by commit, the first 3 commits are all functionality-free refactorings, and all the actual functionality is in https://github.com/dimagi/commcare-hq/commit/cf0ee4cb73c5ec1baf4c195c62b87b8eb078e418

very small dependency on https://github.com/dimagi/casexml/pull/106/