Gamma-ray burst science in the era of the Cherenkov Telescope Array