The frontrunners in the Democratic and Republican presidential contests have suffered defeats in the latest US primary in the state of Wisconsin.