Extract duplicated thread_id fallback logic from 11 files into a single
deerflow.utils.runtime.get_thread_id() function with a documented 3-level
cascade (runtime.context → runtime.config → get_config()).
The module docstring also clarifies the __pregel_runtime injection pattern used in
gateway mode.