groupserv: use node colouring to solve the recursion problem, and enable indirect inheritance (closes #302)