Theoretical studies of the defect structures and the spin Hamiltonian parameters for the Pd+ and Pd3+ centers in NH4Cl