Characterization, upgrading and stabilization of petroleum residues and bitumen