inverse attributes

fix the third inverse attribute test, and automatically populate inverse attributes (only with lazy loading)

most of the work went into lazyRefs.h, but it required a fair number of changes in many other files - setting inverse references as the instances are loaded requires late binding, which wasn't available for inverse references.