Thrilling stand with Brook enlivens fourth-day crowd, but early and late wickets leave England on brink