Thread-safety

Applying https://code.google.com/p/httplib2/issues/attachmentText?id=66&aid=-8427136181434858994&name=patch&token=ABZ6GAfk8LtesNdxejjKDkiy_8xFaWBRHQ%3A1407349957295