The Shakespearean monologue that is featured twice in “Hamnet” has long informed the movies, often in surprising ways that can make us rethink the words.