Refactor: scheduler: functionize parsing role in location constraints
Previously, generate_location_rule() (for location constraints with rules)
and unpack_rsc_location() (for simple location constraints) duplicated code for
parsing and validating roles. This is now functionized into
parse_location_role().
This preserves some questionable behavior for backward compatibility. For
rule-based location constraints, an invalid role currently and correctly
causes the entire constraint to be ignored. However if a regular location
constraint has an invalid role, unpack_rsc_location() logs an "Invalid
constraint" message but still creates the constraint ignoring the role.