Add maybe_set_is_loaded function
The is-loaded property is set when the user manager has finished
doing its various asynchronous tasks related to conjuring the
list of users available on the system.
The property value changing to TRUE signifies that the
gdm_user_manager_list_users function can legally be called.
Concretely, is-loaded should only be set to TRUE when both the
passwd file and ConsoleKit history file have finished loading.
This commit enforces those invariants more explicitly by
replacing all set_is_loaded calls with a new function
maybe_set_is_loaded that does the prerequisite checks.
This means as the code evolves, if there are future asynchronous
tasks to wait on, one function can be modified instead of
several.
https://bugzilla.gnome.org/show_bug.cgi?id=622639