change prompt detection heuristics for pty_shell

This is a relatively major change to the pty_shell class which closes #133.  It
introduces a new heuristics for shell prompt detection which is more robust
against strange custom prompts and faulty shell startups.

For low latency links, this heuristics will introduce some additional latency --
for high latency links that should be negligible, and should actually save one
roundtrip in the default case (when the default prompt pattern matches nicely).
Since SAGA targets predominantly high-latency links, this seems acceptable.

Alas, the heuristics will lead to some (non-fatal) ugliness for sftp and scp
connection setup, but for the sake of code simplicity we'll let that slide
(unless it turns out to be a real problem).

This has been tested with bash and tcsh over fork and ssh, with standard and
intentionally broken prompts, but it deserves more testing for robustness before
being released into the wild.