Made RecentlyUsedContainer.keys() thread-safe on Python 3, removed unnecessary copy on Python 2