Fix infinite recursion with deep self fulfilling promises

The following code in the `resolve` method: 

```javascript

else if (objectOrFunction(value) && isFunction(value.then)) {
  value.then(function(val) {
    resolve(promise, val);      // <=====
  }, function(val) {
    reject(promise, val);
  });
}
```

assumes that `val` is never equal to `value` (i.e the promise never resolves to itself).  But after the latest update, promises now might resolve to themselves which means `val` might equal to `value`, which means `resolve(promise, value) === resolve(promise, val)` which causes the infinite recursion.

It was failing when a promise A resolves to a self fulfilling promise B.

```javascript

var promise, selfFulfillingPromise;

selfFulfillingPromise = new Promise( function(resolve) {
  setTimeout(function() {
    resolve(selfFulfillingPromise);
  });
});

promise = new Promise(function(resolve) {
  resolve(selfFulfillingPromise);
});

```

This solution is still Promises/A+-compliant compatible (passes all the tests).