Water authorities in New South Wales have closed a dam in the Blue Mountains after tests showed an elevated level of forever chemicals.