England were bowled out for just 164 in their second innings as Australia won the first Ashes Test by eight wickets after Travis Head's sensational century on day two.