Fix stack overflow due to redundant definition copying.

Bug:

 * Open the REPL.

 * Create a definition.

 * Evaluate that definition repeatedly.

 * REPL crashes with a stack overflow.

Fix:

Do not prepend prelude definitions to compiled definitions
in the REPL, as this is already done during resolution.
Fix inference order of program and definitions.
Fix inference order of locals.
Clean up some formatting.
Add basic vector builtins.
Embed a basic prelude.
Avoid misuse of function constructor.