Improve interactive selection input

- Print the static index groups always at the start of the prompt.
- Add a hint for that an empty line provides information about the
  available index groups.
- Print the whole prompt again after an empty input line.
- Print only the selections from the current interactive prompt in the
  output.  This makes the listing clearer for commands like
    gmx sasa -surface -output
  when providing the latter set of selections interactively.
- Print the number of selections still required after the above list.
- Work better (on Unix) if stdin is from a pipe (using the same
  mechanism that was there in 4.5 and 4.6).

Change-Id: I38152fb4fccd142aeee318739ab3782fa6a775d8
Remove interactive help from core selection parser

The help is now handled in the loop that processes user input, and it
never gets into the parser itself.  This removes several special cases
from the parser and simplifies it.

Add a few string utilities and tests for them to make it easy to handle
the help commands.

Change-Id: Ida58bccd3b9ced4b7060485cc2f064b73796c996