Subtask-Aware Visual Reward Learning from Segmented Demonstrations