Set special vars in play.vars rather than load_vars

Also refactors playbook loading code relating to vars in playbooks
to a sub-function.

Fixes #8534