WICKET-5409 wicket-native-websocket does not work with Safari/Safari iOS

set response headers only for Tomcat:
  resp.setHeader("upgrade", "websocket");
  resp.setHeader("connection", "upgrade");

Downport some improvements from master branch