Refactor ->prev to ->link in parser.c

Make parameters a forward pointing linked list
Keep stack as a backward pointing stack
Use bool more and check existing id properly
Stuff needed by project 3 for logging
Check that identifiers and parameters are not redeclared
Pop locals and subprograms when they go out of scope
Check expressions for boolean and do variable assignment
Start to check for undeclared identifiers

TODO: add backwards pointing prev_scope pointer to stack_node
Need to be able to iterate through locals and parameters through the scopes
Do want to skip the parameters of things that aren't in the prev_scope stack though
Parse types in expressions and factors

This probably has logic boolean errors all over it
Fix parsing of array expressions and factors