initialiize opline for the case it lands in default case
do portable socket checks

also introduced a portable macro for that
cleanup unused variable
fix var usage only when unistd.h available
fix sprintf spec
fix var declaration used by macro conditions
moved libs and debug/release mode setup into functions
further fixes to win build

- fixed pdb generation with vs
- made object-out-dir to use an absolute path, that fixes path issues
  with x86/x64 and nmake snap
fix trailing slash