null pointer fixes and http server additional functionality

- bunch of fixes
- added CORS support to NanoHTTPD server
- added support for creating session by header field 'client-id'

Signed-off-by: Michal Bínovský <mbinovsky@sygic.com>