A secretive cellphone spy device known as StingRay, intended to fight terrorism, was used in far more routine LAPD criminal investigations 21 times in a four-month period during 2012, apparently without the courts’ knowledge that the technology probes the lives of non-suspects who happen to be in the same neighborhood as suspected terrorists.