Unifying Deductive and Abductive Reasoning in Knowledge Graphs with Masked Diffusion Model