testsuite: Simplify kernel32 glue logic
testsuite: Simplify kernel32 glue logic

On Windows the testsuite driver calls kernel32 to set the current
terminal codepage. The previous implementation of this was significantly
more complex than necessary, and was wrong in the case of MSYS2, which
requires that we explicitly load the library using the name of its
DLL, including its file extension.

Test Plan: Validate on Windows

Reviewers: austin, RyanGlScott, Phyx

Reviewed By: RyanGlScott, Phyx

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2641

GHC Trac Issues: #12661

sdiehl/ghc,ezyang/ghc,shlevy/ghc,ezyang/ghc,olsner/ghc,ezyang/ghc,ezyang/ghc,shlevy/ghc,mettekou/ghc,mettekou/ghc,sdiehl/ghc,ezyang/ghc,shlevy/ghc,ezyang/ghc,olsner/ghc,shlevy/ghc,shlevy/ghc,mettekou/ghc,olsner/ghc,mettekou/ghc,mettekou/ghc,olsner/ghc,shlevy/ghc,mettekou/ghc,olsner/ghc,sdiehl/ghc,sdiehl/ghc,ezyang/ghc,olsner/ghc,sdiehl/ghc,shlevy/ghc,sdiehl/ghc,sdiehl/ghc,mettekou/ghc,olsner/ghc