backport.pl: Restore cooked mode upon abnormal termination.

* tools/dist/backport.pl
  (prompt.$getchar): Restore cooked mode if ReadKey croaked.
  (signal_handler): New.
  (main): Use signal_handler() to restore cooked mode if ReadKey was
    interrupted by a SIGTERM.

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