fix(semantic): bug when resolving references on scope exit causing references that occur before declarations to never be resolved. Caused by incorrect unresolved reference count, which in turn caused unresolved references to never be moved to parent stack frame.
test(semantic): reference counting unit tests.
fix(printer): better indenting when printing symbols and scopes.