Austrian world No 70 Dominic Thiem caused a major shock by knocking out Swiss third seed Stanislas Wawrinka in the second round of the Madrid Open.