Alignment Memory of a Nematic Liquid Crystal and Thermal Isotropization of the Surface Adsorbed Layer