Improve error reporting
Keep track of the exact location the error occured in and switch
the internal error description from a dynamic string buffer to an
integer which either holds negative values for lexer errors or
positives values for grammer violations.
In case of grammer violations the "error_code" member will hold
a bitfield describing the expected tokens.
Also rework the error messages emitted by the cli to be more
precise.
Examples:
$ jsonfilter -s '{}' -e '@.foo bar'
Syntax error: Expecting End of file
In expression @.foo bar
Near here ----------^
$ jsonfilter -s '{}' -e '@.foo\bar'
Syntax error: Unexpected character
In expression @.foo\bar
Near here ---------^
$ jsonfilter -s '{}' -e '@.foo..bar'
Syntax error: Expecting Label or '*'
In expression @.foo..bar
Near here ----------^
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>