Memory allocation cleanup

Reduce number of new objects being created in PostgreSQL queue
Fixed decoder

Decoder was breaking when processing binary packets because the header and remainder of the packet need to be processed as one.