Nested replicator dynamics, nested logit choice, and similarity-based learning