Compiler deadlock detection

I implemented a deadlock detection inside the compiler. For details see #516. Basically I build a dependency and check for cycles. If there is a cycle I try to fix the deadlock by first trying to switch build and probe side of hash joins. If that does not work I insert pipeline breakers and force materialization.

I am not 100% sure that all cases of deadlocks in combinations with iterations are detected. Especially I couldn't take care of deadlocks that occure in combination with the termination criterion of the BulkIteration, since it is not yet part of the master.