Code rearrangements and comment edits to make algorithms more clear.

git-svn-id: http://svn.savannah.nongnu.org/svn/avr-libc/trunk@2321 1084037a-409f-4a99-8160-1a4b3577d4c1