America's JJ Spaun beats Robert MacIntyre by two shots to win first major title on chaotic final day at the US Open.