Google will pay a record $391.5 privacy settlement after 40 US states claimed that the tech giant tracked users who had opted out of location services.