tests: kern: add some tests for TIOCSTI
These offer at least rudimentary coverage of TIOCSTI, ensuring that it
basically works and does what it's described to do and throws errors for
unprivileged use that is supposed to be blocked.
Reviewed by: kib
(cherry picked from commit d094dd9071cea1a2f67c5058caa4d22611da20ad)