A former Google engineer is accusing the company of firing him after he spoke out about repeated incidents of racism, sexism and harassment.