Fixes redirect not working correctly when the case is wrong.
Adds Tool#getApplicationName API so that a tool can identify which routing application it's associated with.
Changes ToolPageContext#toolUrl and its related methods to use the new Tool#getApplicationName API.
Fixes JspWidget to not use remoting if application name is available (e.g. internal app).