Read all data before decoding incoming packet

This fixes a "panic: runtime error: slice bounds out of range" crash due to the way incoming data is decoded into gearman packet structures. The code tries to decode a packet of size > 1024 bytes when only 1024 bytes have been received.