Node centrality in weighted networks: Generalizing degree and shortest paths