Fix halting target in gdb_server.py
Fix halting target in gdb_server.py

The gdb server reports it supports "no ack" mode, but still sends acks
after switching modes.  This causes the gdb client to hang when sending
the halt command (ctrl-c).

This patch prevents gdb server from sending acks after it has switched
modes.  It also explicitly clears out the data buffer after calling
handleMsg, since this was done implicitly by the code responsible for
reading acks.

The problems halting the target were introduced in the commit:
29e552501686908fc6c05abdf98c9fadf0446b76 -
"GDBServer no ack mode support."

mbedmicro/pyOCD,tgarc/pyOCD,oliviermartin/pyOCD,wjzhang/pyOCD,0xc0170/pyOCD,bridadan/pyOCD,0xc0170/pyOCD,c1728p9/pyOCD,molejar/pyOCD,adamgreen/pyOCD,matthewelse/pyOCD,molejar/pyOCD,c1728p9/pyOCD,c1728p9/pyOCD,adamgreen/pyOCD,tgarc/pyOCD,geky/pyDAPLink,pyocd/pyOCD,wjzhang/pyOCD,mbedmicro/pyOCD,flit/pyOCD,molejar/pyOCD,0xc0170/pyOCD,pyocd/pyOCD,devanlai/pyOCD,mesheven/pyOCD,wjzhang/pyOCD,matthewelse/pyOCD,devanlai/pyOCD,bridadan/pyOCD,oliviermartin/pyOCD,tgarc/pyOCD,geky/pyOCD,mesheven/pyOCD,bridadan/pyOCD,matthewelse/pyOCD,devanlai/pyOCD,adamgreen/pyOCD,mesheven/pyOCD,oliviermartin/pyOCD,flit/pyOCD,geky/pyOCD,geky/pyOCDgdb,mbedmicro/pyOCD