TIP: Task-Informed Motion Prediction for Intelligent Systems