Marlis Petersen, the Ophelia in the new Metropolitan Opera staging of Ambroise Thomas’s Hamlet, was engaged for the part only a few weeks ago, after Natalie Dessay withdrew due to injury. The problem: she was singing Medea in a challenging world premiere in Vienna until the Saturday morning before opening night.