toke.c, scan_ident(): use PEEKSPACE() to skip over whitespace.

This fixes a number of bugs regarding whitespace and line numbers
in scan_ident(), such as ${\nfoo\n} not increasing the line number,
or ${\ntime\n[1]} not working.

It goes through a number of hoops to get the correct line number for
warnings emmitted from scan_ident, and reverts CopLINE to its
original value if scan_ident() is giving up and returning from the
point of the opening bracket, like in the case of ${\n\nfoo()}.