Phase-dependent electronic specific heat of mesoscopic Josephson junctions