Integrating gasification process with residue upgrading can produce high-value multiproduct streams while decreasing total refinery emissions