Australia prevail in another Edgbaston Ashes classic to beat England by two wickets and take a 1-0 lead in the series.