Allow the number of switches/pods of the topology to be configured

This requires converting between the number of switches and the number
of fat-tree pods. This logic is used both in the construction of fat-tree
topologies and switching between topologies in HTML.