PHP API recv performance improvements

Hello again,

I've fixed the newline issues and added some extra checks.

I'm also attaching the profiler runs for each version. The runs go through a hash of 100,000 keys.

![xhprof__hierarchical_profiler_report](https://cloud.githubusercontent.com/assets/679016/4520310/fa381c6a-4ce6-11e4-9581-5e93579025c5.png)

![xhprof__hierarchical_profiler_report](https://cloud.githubusercontent.com/assets/679016/4520311/0e7cfdc6-4ce7-11e4-8d69-92976ca1d76f.png)