add Revision.equals()

I see the null check in getSha1String(), but it doesn't make sense to make a revision without sha1, that's why I put the null check in the constructor.