fixed phpdoc for Request::url function params

Removed

* @param   array    $params    URI parameters
fixed phpdoc for test_url function
add the failing test
add a condition to test if the url is external
Adjusted ternary operator to comply with coding standards
Make it more readable, as suggested by @WinterSilence
Merge pull request #443 from enov/bug/4241/request-url-external

Fixes #4241 Request::url() should return URI if it's external