Energy-aware Resource Management and Green Energy Use for Large-scale Datacenters: A Survey