Ab initio and DFT calculations of some weakly bound dimers and complexes. I. The dimers of ammonia and phosphine