JERSEY-2537 Fixes the issues with replaceMatrix described in this issue: replaceMatrix(null) removes semicolon if there are no matrix parameters, trailing slash is now kept intact, and it only operates on the final path segment instead of the first.
Merge pull request #97 from vetler/task/JERSEY-2537

Fix for JERSEY-2537: JerseyUriBuilder.replaceMatrix(null) should remove semicolon.

replaceMatrix(null) removes semicolon if there are no matrix parameters, trailing slash is kept intact, and it only operates on the final path segment instead of the first.