Catch bubbling IllegalArgumentException

Also catch IllegalArgumentException that can be thrown by UriTemplate which is called by JerseyUriBuilder. If there is an IllegalArgumentException during URL parsing it is very probable that the URL is malformed so I think catching is reasonable. This is also analogous to line 290 that has the same catch.

Jira-Ticket: https://java.net/jira/browse/JERSEY-2680