Medieval Political Competition and the Attack on Ethnoreligious Diversity