refactored locking in UserProfiles/LocalUserProfilesServiceConnector.cs
refactored locking in Inventory/InventoryCache.cs