Membrane reactors for hydrogen production