A variety of projects unveiled in the past year aim to give mobile apps the ability to instantly detect a person’s emotional state.