[NFC] [Serialization] Use semantical type DeclID instead of raw type 'uint32_t'

This patch tries to use DeclID in the code bases to avoid use the raw
type 'uint32_t'. It is problematic to use the raw type 'uint32_t' if we
want to change the type of DeclID some day.

GitOrigin-RevId: 07b1177eed7549d0badf72078388422ce73167a0
16 files changed