Publish API used by luasec

Hi everyone,

This is a quite large pull request and it deserves some explanation. It is one of two pull requests (the second one going to luasec) which shall fix the issue of duplication of code in luasocket and luasec and the issues which arise from using a dynamically linked version of luasec (see also [Prosody bug #28](https://code.google.com/p/lxmppd/issues/detail?id=298)).

The first commit publishes the WAITFD_* constants, which are used by luasec at some places and is part of the modifications luasec makes to the luasocket headers.

The second one is larger and possibly more disputable. It publishes a whole bunch, probably more than strictly needed, of functions using the LUASOCKET_API define. This is required to allow luasec to find the symbols if loaded into the same process.

Together with the pull request which will be issued in a minute to luasec, this could improve user experience, especially on redhat systems, where the libraries are dynamically linked, a lot.

If you have any suggestions for improvements or any kind of critique, please let me know so that we can fix that quickly. I'll link the pull request against luasec as soon as it's done.

best regards,
Jonas