On the Generalized Mean Densest Subgraph Problem: Complexity and Algorithms