restructure lexer

* make the action concept sane and consistent
* possible optimization: replace GotToken signal by
  len(actions) and use IndexError as signal instead of -1 and
  an explicit if in python (TODO: measure wheter this is actually
  faster)
* in doing so the generation of the tables used by the lexer
  has been improved
add support for %function() lexaction