ObjectIndex: make get(classType) return a copy

This avoiding concurrency issues where the objects are added or removed
from the index while another thread is iterating over the list.