Add sha1 support for hashtree

AVB format uses sha1 as the hash algorithm when computing the hash of
each block. This cl adds the support to use either sha1 or sha256 in
the hashtree_info struct. It also moves some helper functions as the member
function of the struct.

Bug: 144388532
Test: unit tests pass
Change-Id: Ie4aef1bdd8fa89240f7c6f83fcb2e33f47a468cb
5 files changed