removed debugging controller code.
added integrity checks to storage service functions
updated storage service tests
updated sync status to be based on actual sync status.
added integrity checks to storage service
refactored sync status to sync service
added tests for sync service
Merge branch 'upstream-develop' into feature/intermittent-background-sync

Conflicts:
	app/scripts/controllers/stockcount.js
Merge pull request #327 from jofomah/feature/intermittent-background-sync

Feature/intermittent background sync