Added some debug logs to the recovery process
Added meta data and routing version to cluster state's pretty print
When sending shard start/failed message due to a cluster state change, use the master indicated in the new state rather than current

This commit also adds extra protection in other cases against a master node being de-elected and thus being null.

Closes #6189