Improve the way REST retrieves a rule's authorized accounts
Currently, the way used by the REST interface to retrieve the list of its authorized accounts is both not very effective, and prone to errors. The server makes 2 SQL requests to the database, the first to retrieve a list of the accounts, and the second to retrieve a list of agents to which those accounts are attached.
Since the REST interface only needs the names of the accounts & agents, this could be simplified a lot by making a single custom SQL request without using the ORM system.