function cleanAvailableUpdates(updates) {
        return updates.reduce(function (arr, updateInfo) {
            var extDefinition = extensions[updateInfo.id];
            if (!extDefinition || !extDefinition.installInfo) {
                // extension has been uninstalled in the meantime
                return arr;
            }

            var installedVersion = extDefinition.installInfo.metadata.version;
            if (semver.lt(installedVersion, updateInfo.registryVersion)) {
                arr.push(updateInfo);
            }

            return arr;
        }, []);
    }
Takes the array returned from getAvailableUpdates() as an input and removes those entries
that are no longer current - when currently installed version of an extension
is equal or newer than registryVersion returned by getAvailableUpdates().
This function is designed to work without the necessity to download extension registry
@param {Array.<{id: string, installVersion: string, registryVersion: string}>} updates
    previous output of getAvailableUpdates()
@return {Array.<{id: string, installVersion: string, registryVersion: string}>}
    filtered input as function description