[ONOS-4042] Bump up Jersey from 1.19 to 2.22.2

- Fix unit test errors of web/api
- Fix default page redirection problem
- Fix compilation errors of web/gui
- Fix configuration of aaa, acl, cordfabric, cord-gui, dhcp, mfwd,
  olt, openstack, segmentrouting, vtn, virtualbng, xos-integration
- Fix unit test errors of cpman, vtn, acl, faultmanagement
- Fix compilation errors of openstack, virtualbng, xos-integration,
  REST SB controller
- Rearrange features.xml to resolve bundle dependencies
- Remove all of stale Jersey 1.x libraries
- Rearrange web.xml to point new Jersey 2.x servlet

Change-Id: Ic17f461ede0aa36fa8d470546d8069152dc1d134
diff --git a/web/api/src/test/java/org/onosproject/rest/BadRequestTest.java b/web/api/src/test/java/org/onosproject/rest/BadRequestTest.java
index 1b462f6..faf483a 100644
--- a/web/api/src/test/java/org/onosproject/rest/BadRequestTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/BadRequestTest.java
@@ -17,8 +17,9 @@
 
 import org.junit.Test;
 
-import com.sun.jersey.api.client.UniformInterfaceException;
-import com.sun.jersey.api.client.WebResource;
+import javax.ws.rs.NotAllowedException;
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.client.WebTarget;
 
 import static org.hamcrest.Matchers.containsString;
 import static org.junit.Assert.assertThat;
@@ -34,13 +35,12 @@
      */
     @Test
     public void badUrl() {
-        WebResource rs = resource();
+        WebTarget wt = target();
         try {
-            rs.path("ThisIsABadURL").get(String.class);
+            wt.path("ThisIsABadURL").request().get(String.class);
             fail("Fetch of non-existent URL did not throw an exception");
-        } catch (UniformInterfaceException ex) {
-            assertThat(ex.getMessage(),
-                    containsString("returned a response status of 404 Not Found"));
+        } catch (NotFoundException ex) {
+            assertThat(ex.getMessage(), containsString("HTTP 404 Not Found"));
         }
     }
 
@@ -49,13 +49,13 @@
      */
     @Test
     public void badMethod() {
-        WebResource rs = resource();
+        WebTarget wt = target();
         try {
-            rs.path("hosts").delete();
+            wt.path("hosts").request().delete(String.class);
             fail("Fetch of non-existent URL did not throw an exception");
-        } catch (UniformInterfaceException ex) {
+        } catch (NotAllowedException ex) {
             assertThat(ex.getMessage(),
-                    containsString("returned a response status of 405 Method Not Allowed"));
+                    containsString("HTTP 405 Method Not Allowed"));
         }
     }
 }