The magnetic behavior of Co atoms on the surface and in the interior of the noble metals Au, Ag and Cu