Stability of charged solitons and formation of boson stars in five-dimensional anti-de Sitter spacetime