Urban Metabolism for Resource-Efficient Cities: from Theory to Implementation