Phylofactorization: a graph partitioning algorithm to identify phylogenetic scales of ecological data