A review of Mike Flanagan's horror film that isn't just about ghosts—it's laced with sadness and questions about belief.