Reorganise class hierarchy
Several classes inherit from BaseNode, but not all from Node. Some statements are nodes with a parent but do not inherit from Node.
We had to define a new mypy protocol during the typing process to avoid reorganize everything.
But we need to reorganize everything.
c.f. https://forge.extranet.logilab.fr/open-source/CubicWeb/RQL/-/issues/5