Better return values from ajaxserver

- argument a=listsensors returns a list off possible sensors
- added inn all sensors - 0 for sensorid for those where that value makes no
  sense
- returning error message if no a parameter
- making data structure and using json_encode withouth any manual editing of
  output