change ota restore caching settings to standard defaults

- always cache if a sync token present
- always cache initial syncs if they take > 1 minute
- never cache initial syncs that take < 1 minute

this commit has all the core functionality changes, but the calling code
and tests still need to be cleaned up.
remove caching_enabled option from RestoreConfig, update tests
fix other tests that default caching broke
fix existing tricky caching bug revealed by tests

invalidating the cached payload before save was actually blowing
away any local changes that had been made to the SyncLog

I expect this to be a big source of inconsistent force syncs in the field.
add cache purging to test
fix broken test

this was actually just testing the expected behavior of a bug that
was in the system. the correct behavior is now tested
remove caching setting from domain model and UI
pep8
move sync token logic into couchforms
invalidate cached payloads on any commtrack submission with ledgers

this fixes another existing bug with caching + commtrack

we have to do this because the consumption ledger is generated dynamically
Merge branch 'master' into ota-restore-caching

Conflicts:
	corehq/apps/domain/forms.py
	corehq/apps/domain/views.py
Merge pull request #4461 from dimagi/ota-restore-caching

cache restores by default