Are computers turning into bigots? Machines that learn to think for themselves are revolutionising the workplace. But there's growing evidence they are acquiring racial and class prejudices too