Netflix has agreed to pay Comcast Corp. to ensure Netflix movies and TV shows stream smoothly to Comcast customers, a landmark agreement that could set a precedent for Netflix’s dealings with other broadband providers, people familiar with the situation said.