Port to Maverics.
Fix cpplint.
Move error handling code to avoid undefined behavior.
Merge pull request #833 from gwtnb/mavericks

Port to Maverics.
Merge pull request #836 from jubatus/cleanup-proxy

cleanup proxy code
fix proxy to remove cancelled session, which cannot be reused, from session_pool