Facebook beats profit estimates despite federal probe and privacy scandals