Switzerland claimed a shock 1-0 win over Brazil in Basel with a Dani Alves own goal enough for the home side.