Molecular dynamics simulations of nanomemory element based on boron-nitride nanotube-to-peapod transition