Inverse Dynamics Pretraining Learns Good Representations for Multitask Imitation