Fixed missing Interlocked intrinsics in MSVC x86.

Patch previously contributed by Vincent Povirk.
Fixed return address intrinsics in MSVC.

Patch previously contributed Vincent Povirk, slightly updated due to some review feedback by Alex Petersen.
Fixed SGen qsort code to compile with MSVC.

MSVC does not understand C99, so we emulate it with some explicit allocas.
Explicitly define strtoull for MSVC releases previous to 2013.
Merge pull request #878 from tritao/master

MSVC build improvements