Added First working upgrade logic
Tests added. test_storage_upgrade fails on activesync
fixed activesync test