As part of a settlement of five legal cases that claimed Facebook allowed advertisers to discriminate against minorities, the company is making changes to its ad-targeting technology.