MACE: a machine-learning approach to chemistry emulation