Enhanced detectability of community structure in multilayer networks through layer aggregation