A Survey on the Densest Subgraph Problem and its Variants