make BUILD_SHARED_LIBS work with WIN32

previously, BUILD_SHARED_LIBS is set to ON,
then used repeatedly and then set to OFF if on
WIN32. This leads to an inconsistent state in
which, eventually, STP_STATIC_LIBRARY is set to
libstp_static and CMake tries to export this
target even though the target is not build.
fix setting of path to headers for msvc

fixed paths to the windows headers, i.e.
replaced '..' prefix, which doesn't make any
sense in the top-level CMakeLists.txt, by
'windows/', which is the place where these
files are actually located.

Also added missing include_directories()
command to use the previously set variable
(STP_INCL_COMM) at all. According to grep,
STP_INCL_COMM is not used anywhere else.
replace <msvc/stdint.h> by "msvc/stdint.h"

this occurs in various headers in the cryptominisat2 directory. msvc/ is
a folder local to cryptominisat. This implementation of stdint.h is
required and provided by cryptominisat because MSVC doesn't provide this
header file at all.

Note that there is another implementaion of stdin.h in STP's windows/
directory. I have no idea what happens if these differ.
removed including of stdlib_hack.h

this file doesn't exist in the project and google doesn't really seem to
know it outside of this particular context either.
use find_package(Perl) for finding perl

instead of hardcoding it in the script as 'perl'. This is more flexible if
perl is not in the path. This is more likely to happen on windows than on
unix, but the solution seems to be cleaner in general.
use std namespace explicitly to make MSVC happy

for some reason MSVC requires the namespace std explicitly
on this particular line, otherwise the code doesn't compile at all.
make inline work for visual studio...

this is odd: On the one hand, inline is not a keyword in visual studio so
it doesn't support it. On the other hand it doesn't allow you to redefine
it because it is a keyword. Fortunately we can just tell visual studio to
allow keyword macros and it shuts up about this.
use alloca instead of vlas on the stack ...

variable length arrys were only added for C99. Support is optional for C11.
At least MSVC knows alloca, though this is also not supported by all
compilers.
don't name a method free...

MSVC gets confused by this. Renamed it to _free. Not a good choice either,
but it solves the problem...
winmin.h behaves strangely with sys/time.h ...

but fortunately these irritatingly strange defines fix this problem for
MSVC.
don't use sbrk on windows, it is not supported
no signals on windows ...

this is non-trivial to port to windows. If you need this you're on your
own...
added never-interactive to lex files...

if this is not added the lexer will generate a call to isatty(), which is
not supported on windows.

Not entirely sure if this is good for unix? An alternative solution would
be to add a always-false isatty() somewhere for windows.
theres no stroull on windows...

so we include compdep.h, which typedefs it to stroui64. Good enough for us.
old-style variable declaration ...

MSVC seems to require variable declarations at the beginning of functions.
include compdep.h on windows for log2...

log2 is not provided by MSVC.
Making the message in CMakeLists.txt read more like English

Hopefully fixes the problem that Dan Liew pointed to
Give a user a warning message in case a Windows build requests a timeout

Instead of silently ignoring the request
C interface: FatalError() called if hard timeout is unsupported (WIN)
Making the 'timeout' command-line option disabled in Windows builds

Since it cannot be supported with signals it's best not to give the
illusion that it works