fix is_orderable bug
Summary:
`is_orderable` is not handling self-references correctly.
Let's consider this case (also coded as a test):
```
struct C; // Not orderable.
struct A {
1: optional B b;
2: C c;
}
struct B {
2: optional A a;
}
```
Now if start `is_orderable()` traversal from A, it would descend into `b`, which
would then back-reference `a`, speculating the outcome to `true`. After that `B`
would be memoized as orderable. Later `A` would be declared non-orderable after
traversal of `c`.
As a solution, we have to adjust the walk logic. It is rather simple though, it
is enough to back-propagate the negative discoveries through the observed edges.
Reviewed By: luciang
Differential Revision:
D40406592
fbshipit-source-id:
25a256c4688e4a352ce7c75e2b61ffef65a1d0ac