Make possible to select the digest algorithm to use

Previously sha1 was the only algorithm used to compute file's digests.
This resulted to be a problem when parsing the `susedata.xml` file generated
from a repository using sha2 as digest algorithm. The `pkgid`s elements inside
of `susedata.xml` were using the sha1 digest, while the entries of
`primary.xml` were using sha2. Some programs, like SUSE Manager, rely
on the `pgkid` to extend the information provided by `primary.xml` with
the details inside of `susedata.xml`. Having a different `pkgid` made
impossible to join the contents of the two files.