JERSEY-2548: Authorization failed when url contains query

 - fix + modified tests

Change-Id: Ib36a019cff36738051cbab593dc85aea3bb0786d
Signed-off-by: Michal Gajdos <michal.gajdos@oracle.com>
Merge "JERSEY-2548: Authorization failed when url contains query"