Netflix, which announced layoff plans last week, posted a third-quarter profit above Wall Street’s expectations.