GraphPartition value checking and cleaning

modularity.py

Added checks in init of GraphPartition to test
1. index is a dict 
2. values in index are all sets
3. index contains all possible nodes

added tests
fixed failing test that was passing an index of type list, (instead of set)
small cruft cleanup