Molecular-level simulations of chemical reaction equilibrium and diffusion in slit and cylindrical nanopores: model dimerisation reactions