layout/force: handle case of zero weight on both linked nodes

In this case treat both nodes as having an equal weight of 1
(arbitrary).

This fixes a divide by zero error otherwise.

Signed-off-by: Alon Levy <alon@pobox.com>