'main' / *_check_path: Precompute $#BUFFER and use it for speed gain
'main' / *_check_path: Precompute $#BUFFER and use it for speed gain

Running main highlighter on itself (both runs are on the optimized
version):

- clean (8 runs, last 3 noted):
1.7007670000
1.7330720000
1.7038810000

- optimized (8 runs, last 3 noted):
1.5007230000
1.5142960000
1.4973320000

Average difference: 0.208456

When parsing main-highlighter with itself, the *_check_path function is
called 426 times. Note that there are 686 region_highlight resulting
entries.

zsh-users/zsh-syntax-highlighting,m0vie/zsh-syntax-highlighting,P71/zsh-syntax-highlighting,m0vie/zsh-syntax-highlighting,joshuarubin/dotfiles,x-way/zsh-syntax-highlighting,danielshahaf/zsh-syntax-highlighting,stuha/wbr-zsh,joshuarubin/dotfiles,danielshahaf/zsh-syntax-highlighting-debian,x-way/zsh-syntax-highlighting,joshuarubin/dotfiles,danielshahaf/zsh-syntax-highlighting,zsh-users/zsh-syntax-highlighting,phy1729/zsh-syntax-highlighting,danielshahaf/zsh-syntax-highlighting-debian,joshuarubin/dotfiles,P71/zsh-syntax-highlighting,phy1729/zsh-syntax-highlighting