Facebook has bought a facial analysis software firm linked to Pittsburgh's Carnegie Mellon University, a move that will help the social media giant boost its artificial intelligence-powered facial recognition technology.