Manage application settings properly

Web app now manages settings/state using the same shared settings
model between views (passed from appplicatino router on main.js), this
way we get the correct change events, especially in the home view.
First actually working version.

Tested on real layout, it is working fine. Controller power slider fill varies
with power adjustment done by PID controller to provide visual feedback on how
the PID is working. All views seem to be working fine.

Still need to implement robust controller port handling, locomotive runtime
monitoring, and locomotive response logging for long term performance monitoring.
Bug fixes

- When adding a new logo and selecting the picture at the same time
  the picture was called "undefined" instead of loco Id. Fixed
- Adding a new loco was not working because of reference to _id in
  template.
- Removed references to localhost in all socket.io calls.
Fix Graph initialisation + add License notices

Finally fixed initialisation problem with flot. Also added GPL
license info in the relevant places.