Dust in and around galaxies: Dust in cluster environments and its impact on gas cooling