Add a cardinality estimator based on the query graph

Signed-off-by: Jakub Wieczorek <jakub@jakub.cc>