The role of energy in a stochastic model of the emergence of autocatalytic sets