Cleanups

- Figure out lexer prefix from input
- Capture current function name in $cur_function
- Rewrite some checks to use exact function name
- Added $debug var
Give function processing a state var %fn_state
Use YY_CURRENT_BUFFER_LVALUE when ensured ok [coverity CID 29242 29252 29253 29295]

Rewrite YY_CURRENT_BUFFER to YY_CURRENT_BUFFER_LVALUE in some
functions after a PREFIX_ensure_buffer_stack() call has been seen.