Peritectic melting of thin films, superheating and applications in growth of REBCO superconductors