Electric dipole moments of neutron and electron in two-Higgs-doublet model with maximal CP violation