Energetics of defects and diffusion mechanisms in graphite