Refactor GDBServer packet send and receive.
Refactor GDBServer packet send and receive.

- Factored packet send and receive into reusable methods.
- Added attributes for new command flag and incoming packet buffer.
- Updated run() method to use new methods.

Signed-off-by: Chris Reed <ddbbf6166888b293a1c3f06933a7a3227dbb7a9f@freescale.com>

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