Quasiperiodic and Chaotic Dynamics in Bose-Einstein Condensates in Periodic Lattices and Superlattices