Fix some bugs in client/server comm on windows

add some debug messages and fix a stupid error when the client
socket reads less the expected number of bytes (windows only)
Fix editor icons not showing on windows
Example: Add more mimetypes

This is badly needed on window since the windows registry does not
contains any mimetypes for code files.