Optimization of Small-Scale Hydrogen Production with Membrane Reactors