Added usage of MessageCollector in Compiler for handling error messages.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>