pstree finds orphans
Commit
26f9b6c1553d021c0bf9dd85f0647dc6e210948d while fixing the missing
root pid problem introduced another problem where PIDs are out of order.
A process that has a lower PID than its PPID would appear twice with
the tree breaking in strange ways.
We now scan the entire process tree first then perform two checks
if PID==1 is missing add it
if a process has no parent, then make it a child of PID==1, either the
real one or the faked one made in step 1
As this is done after all procsses are found, we don't get the previous
breakage.
Ref: https://sourceforge.net/tracker/?func=detail&aid=
3537508&group_id=15273&atid=115273
Signed-off-by: Craig Small <csmall@users.sourceforge.net>