James Magnussen move the clincher as Australia wins relay gold