utils: cleanup pid management and fix hwloc-bind on windows

Uniformize the code for --pid. Initialize to -1, and only enable
the code when > 0 (0 is reserved on both windows and Unix).

It fixes hwloc-bind on Windows because we don't call OpenProcess
on PID 0 all the time anymore.

(cherry picked from commit 9a984f195536b29c9bef6a0289e5cf789c64e2ec)