fix more uses of arg

Follow-up to #24.

I have not really tested those but they look straightforward. Please review before merging though. I hope I got all of them.

I could change loops to use calls to `select()` instead of a local table like [here](https://github.com/diegonehab/luasocket/blob/unstable/gem/ex3.lua) but it makes the code is less readable and I am not sure it is really faster. Tell me if you want me to do so.