Fixed #20865 -- Fixed raw_id_fields to work with callable limit_choices_to.
Fixed #17424 -- annotate() + exclude() bug

The bug was already fixed by 01b9c3d5193fe61b82ae8b26242a13fdec22f211,
so only tests added.

At the same time promote_joins()'s uncoditional flag is gone, it isn't
needed for anything any more.
Removed most uses of _base_manager.