Added locks in lifetime manager for thread-safe resolve.
Minor R# cleanups, added some doc comments.