Facing the unique challenge of merging Stephen King's books with Stanley Kubrick's film legacy, Mike Flanagan steers Doctor Sleep in the right direction