Fixed #10414 -- Make select_related fail on invalid field names.

https://code.djangoproject.com/ticket/10414

This is basically my first non-trivial contribution to Django, so it might not be perfect. I'll be happy to update the PR as required. :)
How about:
```
msg = "Non-relational field given in "select_related: %s"
with self.assertRaisesMessage(ValueError, msg % 'name'):
```