distance: do not allocate large array on the stack

Closes rhbz#951544.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Merge pull request #137 from abrt/rhbz951544-stack-array

Rhbz951544 stack array