Modularity and Mutual Information in Networks: Two Sides of the Same Coin