Changed distance() to be more memory efficient based on email from mailing list.

Changed the implementation so that it uses a smaller array and overwrites it on loop iterations.

http://forum.dlang.org/thread/rwrjgydeiytufcuiqaqk@forum.dlang.org
Sorry Dmirty, I don't quite understand what you're trying to say.