YouTube last year stopped hiring white and Asian males for technical positions because they didn’t help the company achieve its goals for improving diversity, according to a civil complaint filed by a former employee.