fix: validate console handles on Windows to prevent segfault
On some Windows environments (e.g. GitHub Actions runners), _isatty()
returns true for handles that are not real console screen buffers
(likely due to ConPTY). Passing these handles to
GetConsoleScreenBufferInfo causes an access violation (segfault).
This adds two layers of defense:
1. C stub level: validate handles with GetConsoleMode before calling
GetConsoleScreenBufferInfo/SetConsoleWindowInfo. Invalid handles now
raise a Unix_error instead of crashing.
2. OCaml level: wrap the get_size_from_fd call in LTerm.create with a
try/catch. If getting the terminal size fails, fall back to treating
the terminal as non-tty instead of crashing.
Fixes #124