The company’s advertising business is booming, but deep problems loom pretty much everywhere else.