3.6/f/subst args in included buffers

This branch contains a number of inter-related things:
1) lexer related cleanup
2) error handling improvements in the lexer
3) increase unit test coverage in cfg-lexer-subst
4) resolve backtick substitutions when cfg_lexer_include_buffer() is invoked (this is used by the system source & confgen plugin)

It would make sense to merge the branch partially, it is ordered in the 'logical' sequence.

Any kind of feedback is welcome, but I intend to merge at least the less intrusive changes myself in the coming days.

Thanks.