The National Theatre's sparkling production shakes up Oscar Wilde's classic comedy - and leans into its permissiveness and same-sex attractions