Ambitwistor strings and the scattering equations