Rewrite the network formation module

The network formation module has been completely rewritten. Now the
junction recognition is no longer based on the ``highway`` tags, but
rather use sophisticated code to remove nodes with only two neighbours.