MEDIUM: session: take care of incrementing/decrementing jobs

Each user of a session increments/decrements the jobs variable at its
own place, resulting in a real mess and inconsistencies between them.
Let's have session_new() increment jobs and session_free() decrement
it.
6 files changed