High: crmd: Prevent use-after-free when calling delete_resource due to CRM_OP_REPROBE
The GHashTable iterator is invalidated when g_hash_table_remove is called.
Instead, pass down the iterator to delete_rsc_entry so that
g_hash_table_iter_remove can be used directly instead.
Also, use rsc_id_copy, not rsc_id, after the entry rsc_id refers to has been
removed from the resource_history hashtable. rsc_id is aliased with the id
field in the entry itself, and it is freed at this point.