Merge initial closures implementation.

Rename nameless to anonymous.
Add new object and procedure options into ppudump to fix compilation(didn't check work).
Initial changes come from fpc's svn closure branch. Implementation luck of most important file called pnameless. But according to other changes idea of implementation is clear. It's clone of Delphi's approach:
- for each procedure which have nested closures define special object (let's call it frame object, or capturer)
- frame object created at begin of declaring routine activation
- variables which are used from closure are called "captured". Captured variables become fields of frame object.
- anonymous routine became method of frame object. To access captured variables it use fields of frame object.
- referens to anonymous function should
  + point to frame object
  + point to anonymous method
  + be used by compiler to manage frame object's dynamic memory
  to solve this problems for each anonymous method we define interface which contains single method "Apply". Now references to procedure is interface. To call closure we call single procedure of interface.

Closures branch from fpc's snv have 2 commits. Author didn't commit most important file names pnameless.

~ ncgutil: generate interface thunks for local classes too ~ nld: during the first pass, we rewrite the nodes that load captured variables, except for nodes marked with the new flag loadnf_captured_param = pdecobj, symdef: factored out tobjectdef.register_implemented_interface + pexpr: access to captured variables from expressions; nameless routine declarations + symconst: new flags for tprocoption (po_nameless, po_has_closure) and tobjectoption (oo_is_nameless) ~ symdef: mangled name generator is now aware of local classes and interfaces + symsym: new field tabstractnormalvarsym.captured_into holds a reference to a new location for the captured variable

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blaise/closures/compiler@20138 3ad0048d-3df7-0310-abae-a5850022a9f2

+ defcmp: structural equivalence for COM interfaces ~ pdecobj, pdecsub: parsing mode for routines: normal, class method, nameless routine, method reference = pdecsub: factored out parse_proc_parameter_dec(); code simplifications + symdef: tprocdef.add_to_procsym() + ptype, tokens: new UDT -- method reference

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blaise/closures/compiler@20212 3ad0048d-3df7-0310-abae-a5850022a9f2

Fix compilation. Implementation will be fixed in the future.
Remove changes related to variables capturing.

Required to debug parser. Now it's possible to parse anonymous routine inside body of other routine. Anonymous procedure have normal nesting level. So it can't access local variables of outer function. Currently there is no check for this.
Fix parser to eat semicolon after all nested functions.

Problem: parser doesn't eat semicolon after closure's nested function.
Add simple tests for anonymous functions.

Test doesn't cover access of free variables(variables which are used in body but not parameters and not declared inside this function).
Fix broken type helper's declaration.

Problem: compiler doesn't parse type helpers declaration. It complains that identifier "helper" not found.
Cause: Token "reference" is identifier, "helper" is also identifier. Looks like initial closures was done before typehelper development. That is why changes in compiler/ptype didn't consider that "reference" is not unique magic identifier.
Fix: combine handling of "reference to" and "helper" cases.
Show error in case of access to free variable.

Problem: variable capturing is not implements.
Fix: Parses before creation of tloadnode performs check.
Anonymous routine have normal nesting level and can have nested procedures itself.
So simple check of symtable nesting level is not enough. Instead we walk through symtables using parent link. We start from current symtable and go until symtable with normal nesting level. If we didn't come to symtable of variable then this variable located in another function.