Add minor optimizations in SHA1 code

Usually, these sorts of optimizations just do things in a slightly
different order and are able to save an instruction or two.