updated CGC code to support multi-group membership of nodes

generalized the code to handle the FI estimation in the CGD for
multiple-group membership of nodes. accomplished using
inclusion-exclusion principle.