Separated webserver to support stopping it properly.
Fixed restart/reboot/poweroff functions for windows.
Fixed problems mentioned in issue #46.
Improved type checking for plugin options.