Superconducting transition temperature and Cu spin moments observed by the nuclear heat capacity in La2−xMxCuO4 (M=Sr and Ba)