FORMATION OF COLLAPSING CORES IN SUBCRITICAL MAGNETIC CLOUDS: THREE-DIMENSIONAL MAGNETOHYDRODYNAMIC SIMULATIONS WITH AMBIPOLAR DIFFUSION