tools: Clarify logic in crm_resource with comments and defined constant
I added some comments as I was trying to figure out what the code did,
and they may be useful for the next person. Also, the literal 1 was changed
to the more obvious defined constant pcmk_option_hidden where appropriate.