openfimg: Implement finding of dominator trees

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>