Sexism, racism and bullying are driving people out of tech, US study finds