Refactor select_related to support Django semantics and deep caching.
Merge pull request #192 from spectras/feature/deep_select_related

Refactor select_related to support Django semantics and deep caching.
Fixes #189 as a side effect.