Australia advanced to the Davis Cup semi-finals with a 2-1 win over the US.