scanner_get_token: robustness improvement

Patch to make scanner_get_token more robust (avoid over-reading).
Enforce RFC 2616 and accept "0" after a backslash for quoted-strings.

Reported by Peng <howtofly(at)gmail.com>