Fixed gcc warnings and revert RunQueuedClosures

Wrapped MSVC specific pragmas in #ifdef _MSC_VER. Also last edit to
implement_loop_executor::RunQueuedClosures introduced a bug, this was
fixed (--count; was deleted, it
was put back in in this commit)