A wide-ranging federal investigation into Facebook for its privacy missteps concluded Wednesday with a settlement that threatens to saddle the tech giant's powerful chief executive, Mark Zuckerberg, with sustained Washington scrutiny for the next two decades.