Use finer grained locking in the StubService.
Fix risk of ConcurrentModificationException in getters that exposed private lists.