Tomas Galvin hit a priceless extra-time winner as Dungannon Swifts knocked Coleraine out of the Irish Cup at Stangmore Park.