Fix creation of rev-ref attributes to same type
Fix handling of Q.NOT and __not__ for SAW.QX
Use `LEFT OUTER` joins for rev-ref attributes

Otherwise, queries for entities without links don't work.
For `distinct`, add `order_by` to `select` clause

For `SELECT DISTINCT`, PostgreSQL requires `ORDER BY`
expressions to appear in the select clause.
Change `set_c_attr_value` to use `obj.FO`

Otherwise, formatting of attributes with complex Python values, e.g.,
IP-addresses, fails.
Remove `None` from `undefs` for `__not__`

Otherwise, `~ Q.foo` for an attribute with value `None` returns `None`
instead of `False`.
Move support of `AND`, `OR`, `NOT` to `TFL.Q_Exp`

Up to now, Q-epxressions like::

    Q.foo & Q.bar

were not legal. After this commit, they are supported.