main/bridge_basic: Fix features regressions introduced by r428165

In r428165, two bugs were introduced:

* Prior to entering the features retry loop, the buffer that holds the
  collected digits is wiped. However, this inadvertently wipes out the
  first collected digit on the first pass through, which is obtained
  in ast_stream_and_wait. This caused all of the features tests to fail.
* If ast_app_dtget returns a hangup (-1), the loop would retry incorrectly.
  If we detect a hangup, we have to stop trying the feature.

This patch fixes both issues.

Review: https://reviewboard.asterisk.org/r/4196/


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/13@428505 f38db490-d61c-443f-a65b-d21fe96a405b