Fix several differences in the parsing of $.. and ${...}

Namely:
    * The first character in ${...} used to have no restrictions
    * ${foo:bar} used to be legal
    * ${foo::bar} worked, but ${foo'bar} didn't

And possibly other subtle, so far undiscovered bugs. This was
resolved by simply using the same code for both things.

Note that this commit is not entirely useful on its own; While
tests pass, it requires changes from the following commit to work
entirely.
Restrict the valid identifier syntax, fix some identifier bugs.

Fixes:
    * Length-one identifiers are now restricted to
        [\p{XIDS}\p{POSIX_Punct}\p{POSIX_Digit}\p{POSIX_Cntrl}]
      plus, if under 'no utf8', the 128 non-ASCII characters in the
      Latin1 range.
    * Identifiers that start with ASCII letters can be followed with
      XIDC characters

(The committer made some small edits in the pod)
open FOO || die; doesn't need a special identifier parser.

Turns out this can just use scan_word().