Bug 443809 - Reduce work in AutomaticUpdateScheduler

Profile ID is always IProfileRegistry.SELF so use constant instead of
assigning it to variable.
Remove frequent access to IProvisioningAgent by passing it a field
Rename garbageCollect method to something more telling
(removeUnusedPlugins)
Move session creation to plugin at first access instead of eager loading
Remove profileId== null check as this never can happen
(IProfileRegistry.SELF) is always used
Remove constructor and move logic to earlyStartup method
Read and check PREF_AUTO_UPDATE_SCHEDULE only in schedule
Move checker initialization to the scheduleUpdate method where it is
used 

Change-Id: Ib02744583ef6d285262e494211f85e461376f274
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2 files changed