A stochastic model of catalytic reaction networks in protocells