Lawsuit: Mass., Google put spyware on residents' phones