Over the past five years, Google and Facebook have cut a conquering swath through the market for digital advertising, snatching ever more business from legacy media companies, such as print newspapers and magazines. But a growing scandal involving the inadvertent placement of ads next to extremist content on Google’s YouTube video has raised questions about whether the balance of power is about to shift again.