Ab initio simulations of boron-nitride nanotube growth