Add support for select_related() and in_bulk().

This patch adds support for the `select_related()` and `in_bulk()` methods.
They seem to work as they should (have been in production use), but someone more deeply versed with hvad should probably take a look.