Magnetism, specific heat, and pressure-dependent resistivity of the electron-doped compounds Ln2−xMxCuO4−y (Ln = Pr, Nd, Sm, Eu, Gd; M = Ce, Th)