Split demo and JSON API applications.

Separated the API startup script from the demo and added optparser commandline handling to both of them. For the server the port and controller class can now be set from the commandline. For the demo app only the controller class needs to be provided. These default to the previous defaults (controller 'JTagController' and port 8000)