Safer key/value lookup of results

* Some results have a key but not a value, this should catch those.
  Specifically /queue/simple/getall will behave this way IIRC.
Force reading the proper length from the API
Merge pull request #1 from losinggeneration/master

Add proper protocol checks and fix unsafe result part parsing