[AdgLDim] Implemented automatic "detached" computation
[AdgLDim] Implemented automatic "detached" computation

Cleaned up the code choosing the "outside" flag when set to
ADG_THREE_STATE_UNKNOWN and added similar logic needed to choose the
"detached" state.

ntd/adg,ntd/adg