Proper directory_map test skip

* added the needed trailing backslash
* use is_dir() instead of opendir() as it doesn't throw error on failure
Router improvements

- Make dashes-to-underscores URI segment replacement configurable via ['translate_uri_dashes'].
- Make _set_routing() protected and move the call to the class constructor.
- Remove redudant calls to set_class() and set_method().
- Clean-up/optimize the routes loading procedure.

(fixes issue #2503)
[ci skip] Remove a leftover description of the non-configurable translating of URI dashes
Simplify directory_map test skip
Merge pull request #2541 from vlakoff/develop-4

Proper directory_map test skip
Merge branch 'upstream'
User_agent library: robuster detection in is_referral()
Cache result of is_referral()