Spanning trees on graphs and lattices in d dimensions