The stress field and energy of a three-dimensional dislocation loop at a crack tip