About three years ago, Reed Hastings set out to answer a question that had bedeviled Hollywood for the past decade: How did a small DVD-by-mail company build the most popular TV service in the world?