Changed function signatures for receivethreadidle and active
Added Vector buffer

Included vector in controlthread and added a typedef for the transmit
buffer.
control thread now should restart the receive thread as needed