7227 Flag for loading resources and campaigns cache on UI thread

https://swrvedev.jira.com/browse/SWRVE-7227
Also:
- Moved serialization of caches to background thread
- Fixed bug where campaign impressions were saved from not synchronized cache

Private changes: https://github.com/Swrve/swrve-sdk/pull/763