Move path relativization/expansion logic from Item._setitem/__getitem__
into dbcore layer (PathType.to_sql/from_sql and PathQuery), so all
models benefit without per-model overrides.
Propagate contextvars to pipeline and replaygain pool threads so the
library root context variable is available during background processing.