Integrated processes for the production of hydrogen or synthesis gas containing a purification step for the hydrogen or the synthesis gas