move BadStateException to exceptions module and add RestoreException
whitespace
make BadVersionException, make RestoreException extend ValueError
catch all RestoreErrors and show more appropriate messages to users
Merge pull request #114 from dimagi/ota-restore-caching

more refactoring and cleanup
add (not enabled anywhere) ota restore caching to sync logs
add test for payload caching
remove redundant exception
2 for 1 here for meta handling


primary: use a wrap() instead of constructor for metadata to better handle dynamic properties (in this case USERNAME) so it doesn't auto type them.

secondary: better handler for scrubbing dict properties and appVersion dict stuff from the meta block.
adding comment.

this branch addresses case: 70127
add cache invalidation and test for it
remove deprecation warnings
unused import
fix bugs with empty sync log id
switch test util to use RestoreConfig and add caching option
add functional caching test
fix iteration modification bug
tests for cache invalidation
fixing ret cleanup for return for meta
Merge pull request #65 from dimagi/meta_fixes

Meta fixes 2 for 1