Diffusion Model is an Effective Planner and Data Synthesizer for Multi-Task Reinforcement Learning