Refactor: scheduler: best practices when processing resource history
Rename check_actions_for() to process_rsc_history() for readability,
add a doxygen block, drop a redundant argument, use a convenience function
where appropriate, and improve formatting, comments, log messages, and variable
names.