cubicweb #3259713 symmetric relations: drop broken read-sql hack in favor of hooks [validation pending]

see:

********************************************************************************

u'Session S WHERE S owned_by V, U friendship V, U login "doug"'

SELECT _S.cw_eid
FROM cw_CWUser AS _U, cw_Session AS _S, friendship_relation AS rel_friendship1, owned_by_relation AS rel_owned_by0
WHERE rel_owned_by0.eid_from=_S.cw_eid
  AND rel_friendship1.eid_to=rel_owned_by0.eid_to
  AND (rel_friendship1.eid_from=_U.cw_eid
       OR rel_friendship1.eid_to=_U.cw_eid)
  AND _U.cw_login=%(80023176)s

{'80023176': u'doug'}

<empty resultset Session S WHERE S owned_by V, U friendship V, U login "doug">


********************************************************************************

u'Session S WHERE S owned_by V, V friendship U, U login "doug"'

SELECT _S.cw_eid
FROM cw_CWUser AS _U, cw_Session AS _S, friendship_relation AS rel_friendship1, owned_by_relation AS rel_owned_by0
WHERE rel_owned_by0.eid_from=_S.cw_eid
  AND rel_friendship1.eid_from=rel_owned_by0.eid_to
  AND (rel_friendship1.eid_to=_U.cw_eid
       OR rel_friendship1.eid_from=_U.cw_eid)
  AND _U.cw_login=%(79206304)s

{'79206304': u'doug'}

<resultset Session S WHERE S owned_by V, V friendship U, U login "doug" (4 rows)>
priorityimportant
typebug
done in3.18.0
load1.000
load left0.000
closed by#0542a85fe667 symmetric relations: replace bogus rql2sql translation by a hook
patch[rql2sql] remove special behaviour of symmetric relation vs DISTINCT [applied][migration/3.18] add sanity checks before changing symmetric relations [applied][migration/3.18] disable all hooks when setting up symmetric relations [applied]symmetric relations: replace bogus rql2sql translation by a hook [applied]