Supervised Pretraining Can Learn In-Context Reinforcement Learning