Add missing params to get_target_from_rule

get_target_from_rule was extracted from main() without enough parameters for
all the local variables it took with it from the extraction site.
Check for the numeric "all" value (-1) for the rule protocol

Fixes #7832
Merge pull request #8174 from altruism/devel

Make ec2_group module not just fail
ec2 module: document valid states
Merge pull request #8385 from lorin/doc-ec2-states

ec2 module: document valid states