Merge change I2c5380a6 into eclair-mr2

* changes:
  Fix a bug in the Settings contract class (introduced in an ... iffy ... fix to a race condition) that breaks the caching of non-existent Settings/Secure/ Gservices values (causing lots of unnecessary database queries).