Solving dynamic contact problems with local refinement in space and time