Effect of dark matter halos on the orbital and escape dynamics of barred galaxies