XD-902: Properly close redis connection factory in tests

Tests that leverage [Redis|Rabbit]AvailableRule often create another connection factory in the test body but fail to close it.

Tests should properly close the resource. As an added benefit, the rule itself can expose the resource that it created for deciding whether to skip the test or not