Apple is working on building tools and features within the iPhone that could detect depression, anxiety, and other cognitive decline illnesses. The phone will pick up on people’s facial expressions and other signals, in the hope of spotting early signs to avoid more negative outcomes.