Upscaling of coupled geomechanics, flow, and heat in a poro-elastic medium in the quasi-static situation