This function checks, for all UNIT structures in net, if its LINK structures
have valid values.
Checks include: LinkFlag should be INLINK for links in a UNIT 's InLink
list, OUTLINK for links in a UNIT 's OutLink list (see LINK-flags);
the Unit and Weight fields should not be NULL. Furthermore, the number
of incoming and outgoing links is counted for each unit and compared to
the values in its NumInLinks and NumOutLinks fields. Finally, the
total number of links is compared to the NET structure's NumLinks field.