JosmTextField: setHint now properly returns the old hint
See #21319/r18221. This additionally adds a non-regression test.