add a current release version number file
add a version check feature

this is only enabled on windows as there is no package manager handling the versions
and we don't want users to stay on old versions forever
win32: little static link hack for windows builds
push current release
fix memory leak
Fix version.sh script to run on non-bash shells

Most non-bash(like) shells don't support command line arguments for the
echo command and print them like regular text. On these systems an
invalid gen_version.h file is generated. This can be fixed by using
printf instead of echo which works the same on all Unix systems.

Also fix the detection whether the gen_version.h file changed before
rewriting it. This prevents creating a file with exactly the same content
but a newer timestamp and therefore make deciding to recompile all files
including it.