Move Windows OS-specific functions to make porting easier.

Several functions that need to be redefined for a Windows port are right
in the middle of other code that is relatively portable. This patch
isolates the functions that need Windows-specific implementations so
they can be built conditionally in the portable tree.

Add calls to BIO_sock_init() as-needed to openssl(1) so that socket IO works on
Windows.
update testssl to deal with .exe binary suffixes
select->poll conversion for openssl(1)

This is based on a patch from deraadt@ plus some fixes for bugs found while
testing Windows poll(2) emulation.