Algorithms for partitioning well-clustered graphs