SI-8672 Better end-of-sentence detection for Scaladoc

The first sentence of a Scaladoc comment is parsed as the summary.
However, this was breaking of the sentence at the first `.`, even
if that was immediately followed by another character.

This commit only considers a period followed by whitespace, EOL or
EOF as the end of a sentence.

Review by @vladureche