Introduce `assignLinks` phase of deserialization.

This phase is performed after normalization, when all new records are
assigned local ids. Therefore, links can be assigned even to new
records, which will have their local -> remote ids mapped in the schema.

[Fixes #33]