Simplified and refactored examples/dynamicnet.py

Also, extended LinearTopo to support multiple hosts per switch