Use a weak hash table to store loading objects

Don't keep items that fail to load around forever. Less importantly,
don't load an item only to immediately destroy it.