Fix type attribute inside of repoindex.xml

Do not add the file checksum to the type attribute.
Ensure right checksum algorithm is used

Ensure the same checksum algorithm of the original repository is used
when the user doesn't specify a custom one. Previously the code ended
up using SHA1 by default.

That is better for consistency.