Move dynamic parser loading logic to the compiler module

Move parser.h into a separate directory so compiler can include it