AutostartManager: do not store pid if it is null.

This resolves the segmentation faults when LaunchMode is SYNC.
Merge branch 'master' into debian
0.30-1