Initial profile version XML writing/reading
* Move profile locking logic from ProfileService to ProfileRegistry
* Add a cache for ProfileVersion in the ProfileRegistry