Quasinormal modes of (anti-)de Sitter black holes in the 1/D expansion