WIP: Add script to evaluate tree

queries the pipeline and parses tree into simpler structure with back-references

TODO:
 - Write SQL queries to get tuples out of DB (already something prepared...)
 - Recursively go through tuples and find images with min distance in resukt tree
   -> breath search