Fix: scheduler: remote state is failed if node is shutting down with connection failure
When determining remote state, if the connection resource is failed and not
being started again, we consider the state to be unknown if the connection has
a reconnect interval, because we won't know whether the connection can be
recovered until the interval expires and we re-attempt connection.
However, if the node is shutting down at the time, we won't re-attempt
connection, so consider the state failed in that case. (Note that we check the
actual shutdown node attribute, rather than node->details->shutdown, since that
is set for remote nodes whenever the connection is stopping.)
This avoids a situation where actions that cannot succeed can be scheduled on a
remote node that's shutting down.