update supply points whenever their associated locations change

+ a bunch of miscellaneous cleanup/refactor.

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/