clean up trigger scanner thread sync blocks and add orphan process sweeping script

1. clean up trigger scanner thread sync blocks.
   TriggerManager and TriggerScannerThread now runs under the same syncObj to prevent deadlocks during trigger processing.

2. add orphan process sweeping script if we ever have orphan process again.