cubicweb #3261648 Simplify RQL rewriting on optional / inlined relations [open]

Considering the following RQL:

Any A,N WHERE N is Note, N? rel A

and the following read rql expression on Note entities:

ERQLExpression('X todo TRUE')

the generated RQL is:

Any A,N WHERE N is Note WITH N,A BEING
             (Any N,A WHERE N? rel A, (N is NULL) OR (EXISTS(N todo TRUE))

The RQL below should probably be enough:

Any N,A WHERE N is Note, N? rel A, (N is NULL) OR (EXISTS(N todo TRUE)
priorityimportant
typebug
done in<not specified>
load0.500
load left0.500
closed by<not specified>