Fix issue #4280: Prompt the controlling terminal, rather than stdin.

* subversion/libsvn_subr/prompt.c:
   Include apr_portable.h and optionally either conio.h or termios.h.
 (terminal_handle_t): New struct, open terminal descriptor.
 (terminal_cleanup_handler, terminal_plain_cleanup, terminal_cleanup_handler):
  New; pool cleanup handlers for closing an open terminal.
 (terminal_close): New; explicitly closes a terminal.
 (terminal_open): New; opens and initializes a terminal.
 (terminal_puts, terminal_getc): New; terminal I/O uses direct console
  I/O on Windows and/or /dev/tty where available, with fallback to
  stdin for input and stderr for prompt/output.
 (prompt): Use the new terminal functions to implement platform-
  -independent prompting and user input.
 (maybe_print_realm, plaintext_prompt_helper):
  Use terminal I/O to display prompts.
  (wait_for_input): Removed; equivalent functionality moved to
   terminal_open and terminal_close.

* configure.ac: Check for TERMIOS support.
* subversion/tests/cmdline/update_tests.py
  (eof_in_interactive_conflict_resolver): Skip unconditionally.
   Because terminal I/O now usually avoids redirection, and this test
   depends on --force-interactive, it would hang the test suite.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1438997 13f79535-47bb-0310-9956-ffa450edef68