scanner: speed up token position -> location using a cache Signed-off-by: Ran Benita <ran@unusedvar.com>