Add hashing utils and update tar utils.

This is some of the stuff I've written while working on backups.  I'd rather not sequester it away under juju core.
how about encoding the hash as a hex string ?
```
fmt.Sprintf("%x", raw)
```