Fix a crash in flatten_wordgraph.
Fix a crash in flatten_wordgraph.

Example sentence that causes a crash:
@s
Here is what happens:
The word "@s" is unknown, and gets spelled to:
- S
- s
- S's
- W's
...

(Should we try at all to spell-guess short words that include
non-letter characters? The used speller is not good at that and the
results are not useful.)

When the resulted wordgraph is scanned, it's termination node is
encountered while there are still tokens in the path position (pathpos)
queue.  Hence the scan loop continues (it terminates only when the
terminating node is alone in the pathpos queue).

It just happens that the termination node is first in the pathpos queue.
After creating a new 2D-array word, the code then proceed to find its
unsplit_word, a thing which dereferences the NULL unsplit word of the
terminating node.

The fix is to avoid to find the unsplit_word in that case (no new
unsplit_word can be found anyway since the terminating word has been
encountered).

Also add an XXX on a comment "avoid termination word" later in the code,
to hint that this is a subtle stuff that maybe still has hidden
implications.

Also add the node_num of the word to the "Advancing" debug printouts.
This was needed because the wordgraph of the original crashed sentence
was very complex.

linas/link-grammar,linas/link-grammar,ampli/link-grammar,MadBomber/link-grammar,opencog/link-grammar,opencog/link-grammar,MadBomber/link-grammar,opencog/link-grammar,ampli/link-grammar,MadBomber/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,MadBomber/link-grammar,ampli/link-grammar,ampli/link-grammar,MadBomber/link-grammar,ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,MadBomber/link-grammar,linas/link-grammar,linas/link-grammar,linas/link-grammar,linas/link-grammar,linas/link-grammar,MadBomber/link-grammar,opencog/link-grammar,ampli/link-grammar,MadBomber/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar