scratch implementation for writefds

Related with https://groups.google.com/forum/?fromgroups=#!topic/emscripten-discuss/02FZzk2qeTo
All websocket tests are pass.

But game still not work, i try to find problem later. Please take a look if you have free time.