openfimg: Compiler refactoring

Complete redesign of IR structures and APIs to prepare grounds for
SSA'ization and optimization/validation passes.

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