Monte Carlo simulations of electrical double-layer formation in nanopores