Variational and diffusion Monte Carlo simulations of a hydrogen molecular ion in a spherical box