fixed updating of dependencies referenced by specific commit hash

This PR fixes #1333.

When a specific commit is given in the composer.json:
```
"require": {
        "foo/bar": "dev-master#0a42b7e61"
}
```
It always gets updated unnecessarily:
```
  - Updating foo/bar dev-master (0a42b7e61 => 0a42b7e61)
    Checking out 0a42b7e61
```

Using of the package hash in the operations array was introduced to prevent adding multiple update operations of the same package in some cases.