Thermally induced intra-molecular transformation and metalation of free-base porphyrin on Au(111) surface steered by surface confinement and ad-atoms