Refactor the main method to class and change add logging debug mode

1. Refactor the main method to ShadowSocksServer (more nice for set options and set default options).
2. Add logging for debug if necessary.
3. Beauty the logging format