Polymorphism under apostatic and aposematic selection