Internal: ClusterHealthAPI does not respect waitForEvents when local flag is set

It uses a cluster state update task and it gets rejected if not run on a master node. We should enable running on non-masters if the local flag is set.

Also, report any unexpected error that may happen during this cluster state update task

Closes #7731
Discovery: not all master election related cluster state update task use Priority.IMMEDIATE

Most notably the elected_as_master task should run as soon as possible. This is an issue as node join request do use `Priority.IMMEDIATE` and can be unjustly rejected.

Closes #7718