EMMLi: A maximum likelihood approach to the analysis of modularity