Properly detect cycles in V8ValueConverter, current impl is too strict.

Currently, just reusing a value in extension API would null out the
second occurrence of that value. Ideally, we only need to null out
a value if it introduces a cycle.

Examples of cycle:
1) var v = {}, v = {key: v};
2) var a = [], a = [1, a];

However, these are not cycles and this CL will correctly detect
them as non-cycles:
1) var v = {}, w = {keyA: v, keyB: v};
2) var a = [], b = [a, a]

BUG=606955
Test=See steps in OP https://crbug.com/detail?id=606955

Review-Url: https://codereview.chromium.org/1939233002
Cr-Commit-Position: refs/heads/master@{#391559}
4 files changed