Updates versionCode. Avoids duplicates by synchronizing access to the
postPending method. Checks connectivity changes.