Anna Gasser edged two-time winner Jamie Anderson to win gold in the olympic debut of women's big air snowboarding.