Understanding In-Context Learning via Supportive Pretraining Data