Allow map_hyphen to work for application names

1. Handle hyphen -> underscore replacement of the app name early in map_app(), so the application can be identified and its routing rules used (if they exist).  Without this, the rewriter fails to find the application with the hyphen in place, and reverts to the default.

2. Disable underscore -> hyphen mapping of app name when creating static URLs, as they will be invalid paths