Ancient homology underlies adaptive mimetic diversity across butterflies