Fix race conditions in pool.go

@fatih 
I think I'm finally done. Sorry about the number of commits. I was editing using a web browser. So, not quite in my element.
I'm totally fine if you re-implemented this pull request as a single commit.