indigo: improve group handle to delete all groups.

Fixes #19

Sometimes groups refcount each other and when you delete all current
code fails as refcounter is not 0.
This improvement change a logic to delete all groups with refcount of 0
and repeat the iteration as refcount for other groups can be decreased.
This process lasts for as much as we can delete next groups.

Signed-off-by: Vitaliy Ivanov <vitaliyi@interfacemasters.com>