Split WordLengthHistogram.c to functions

Split code into individual functions (particularly as realised can
actually pass arrays around in a common-sense way without using pointers
to first element).