Coupling of defect pairs and generation of dynamical band gaps in the impurity bands of nonlinear photonic crystals for all-optical switching