enable linking with runtime and libs

adds error message handling to codegen
fixes forward declarations so llvm doesn't see them as duplicates
changes function calling convention to variadic with arg count
fixes order of lib argument type enum
this is a stop-gap until built-ins and library functions can be dispatched correctly