[NFC] [Serialization] Turn type alias LocalDeclID into class

Previously, the LocalDeclID and GlobalDeclID are defined as:

```
using LocalDeclID = DeclID;
using GlobalDeclID = DeclID;
```

This is more or less concerning that we may misuse LocalDeclID and
GlobalDeclID without understanding it. There is also a FIXME saying
this.

This patch tries to turn LocalDeclID into a class to improve the type
safety here.

GitOrigin-RevId: b8e3b2ad66cf78ad2b7832577b1d58dc93c5da21
6 files changed