Dynamic microscopic structures and dielectric response in the cubic-to-tetragonal phase transition for BaTiO3 studied by first-principles molecular dynamics simulation