Two consumer data companies agreed to stop selling consumers’ sensitive location information from places such as houses of worship, health care facilities and military installations under settlements with the Federal Trade Commission.