Technology that detects human emotion is being used by firms to improve customer service, decide which candidates to interview and optimise the emotional impact of advertising. But experts in the field have warned that some software relies on outdated psychological theories and cannot always be trusted