Topic linzhixing

Mainly:
-Refactor NemakiWare server as a library
-Improve permission system(Handle with multiple permission / Fix inheritance calculation)
-Fix other bugs