Voters in Switzerland have rejected a total ban on smoking in enclosed public places at a referendum.