system: do major enhancements for scanmem

We want to run scanmem and the game in the same process group. This
way we don't require root priviledges for it. So we introduce the
new function run_pgrp_bg() for that. It is highly specific and
hacky. It is possible that the game becomes an orphan as we can't
wait for it (due to the exec call for scanmem in the parent).

We need a method to catch orphans (wait for them to exit). The idea
is to use proc_to_pid() with a delay in a loop. So we have to move
the error message there into ugtrain's main() function.

As a further preparation we replace fork_wait_kill() with
fork_proc() and use the functions wait_proc() and kill_proc() for
having the same functionality. This way we can place our orphan
catcher to wait for the orphaned game process.
ugtrain: Introduce scanmem support

We can use scanmem as regular user, now. It is usable in the
discovery stages 0..4 and with pure static memory together with
'-P'. We catch the game process if it becomes an orphan and we use
the chance here to improve discovery and adaption logic as well.

Known issues:

Scanmem reads the available memory regions only once upon start
and only searches in these. So the first time the intersting
object is visible, the scanmem command 'reset' has to be entered.
ugtrain: do not attach memory if no active config

If all values are disabled, then there is no need for attaching to
the game memory. Instead, an external tool like 'scanmem' has its
chance to attach to game memory and to read some values.