The Spontaneous Formation of Stereotypes via Cumulative Cultural Evolution