Check buffer before poll

Sometimes we may already have the data we are polling for in the buffer.
A common example is multi-statement result sets.  Check the buffer for
packets before trying to pull more off the network.
Merge pull request #22 from LinuxJedi/fix_21

Check buffer before poll