Additional thread safety fixes
Additional thread safety fixes

The original fix was not complete, it only synchronized around closed?,
not around close itself. Pretty dumb, but this commit fixes it properly.

Ran it in a loop with Rubinius for quite a while and didn't see any
crashes anymore.

tpetchel/nio4r,frsyuki/nio4r,marshall-lee/nio4r,frsyuki/nio4r,marshall-lee/nio4r,tpetchel/nio4r,celluloid/nio4r,celluloid/nio4r,frsyuki/nio4r,marshall-lee/nio4r,celluloid/nio4r,tpetchel/nio4r