checkdegeneracy function

Generic function for checking whether a statistical network model is degenerate