Whitworth Art Gallery chief stays in post until end of 2022 following exhibition controversy last year