Forty mayors from around the world have signed onto a new pact to try to shape how urban data centers are built and operated.