Google settles with 40 states for $391.5 million over claims it tracked user locations