Add tests to illustrate #16572

Add tests that use select_related to traverse two reverse OneToOne
relationships.

This reproduces the bug described in [ticket 16572](https://code.djangoproject.com/ticket/16572).