core.c: Add initial distribution node handling to core_build_tree

Now can build topologies like core <-> distribution <-> access

Note that distribution node function is not yet complete.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>