Netflix, which announced layoff plans last week, posted a third-quarter profit above Wall Street’s expectations, but investors sent shares down after the streaming company lowered its ad sales guidance, prompting worries about slowing revenue growth.