Skip rule resolution when ruleid matches ruleset_id

Add a checking funtion into CrushWrapper::finalize(), this funtion
will check if current crush rules hoding the constraint that one rule
per ruleset and rule_id=ruleset_id.

If such a constraint holds, we set a flag(is_rule_id_matches_ruleset_id)
to true and then skip the rule resolution (which searches all rules for
a rule with the right ruleset and size).

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
is_rule_id_matches_ruleset_id could still be true and min_size not match for instance. If the rule_exists(ruleset) is false it can either be because the caller gave an invalid ruleset (in which case returning -1) is right or that is_rule_id_matches_ruleset_id is broken (to know the difference you would have to walk all ruleset again to check it).