TextInputWidget: Simplify #getValidity
TextInputWidget: Simplify #getValidity

Use promise chaining and the rejectOrResolve() function for the case
where the 'validate' function returns a promise.

Change-Id: Ideaf541fa18ffe1bdc81a89d2ef3bd2cf8f75ec9

wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui