fixe major bug with stale void* pointer in iterators

base_resource::type_iterator and base_resource::instance_iterator kept
actual pointers (base_resource*) along with pseudo_ptr (RESOURCE_PTR),
it would create segfault when the pool has grown and the pointer is no
longer valid.
Preliminary work on resource indexing, callbacks in pseudo_ptr.h