Follow-up fix to last link serializer changes

Fixes [[Foo, bar|Foo]] round-tripping and a few other issues with category
links.

Change-Id: Ib8e5e5093b9cb2993580b6378d69e96b398c689c
TODO: add parser tests (no changes).