Add failing tests for joining, select-related, and model-aliases.
Refactor instance graph generation for ModelQueryResultWrapper, refs #438