generalize the one-role validation

This moves the one role validation method upper in the inheritance chain so it can be used in all the barclamps which need it. The code mostly comes from https://github.com/crowbar/barclamp-rabbitmq/pull/7/files