I packed everyone's solution up with tests and benchmarks:
https://github.com/tamouse/kaprekar_kata