Reinstantitate now first collects all URIs, and then unloads the
resourceset for reinstantiation.
fixed code to handle selected instance models for reinstantiation.
Merge remote-tracking branch 'origin/develop' into develop