Gluons and gravitons at one loop from ambitwistor strings