The effects of a knot and its conformational relaxation on the ejection of a single polymer chain from confinement