(QENG-431) expanded and improved role support in beaker - reapply

This re-applies the reverted role support for beaker.
Separating out the array from the potential sort item would lose us the flexibility that this method allows.  With this format all of these are valid:
'''
on agents, "do something"
on 'my_agent', "do something"
on :my_agent, "do something"
on hosts, "do something"
'''