Zend/Mvc/Router encoding issue (Fixes #5516)

- adds fix into Zend\Mvc\Router\Http\Segment::encode
- adds test case for new fix

Fixes #5516