Rami Malek’s first post-Oscars role is a masterstroke of perfect casting