[ticket/11508] Split parts of build_url() into reusable functions.

PHPBB3-11508
[ticket/11508] Build the jumpbox hidden fields using the _form action_

PHPBB3-11508
[ticket/11508] Move the stripping param code to separate function as well.

PHPBB3-11508
[ticket/11508] Move helper functions to path_helper class.

PHPBB3-11508
[ticket/11508] Change separator parameter to a simple true|false $is_amp.

PHPBB3-11508
[ticket/11508] Do not add the '?' unless there are parameters.

PHPBB3-11508
[ticket/11508] Add tests.

PHPBB3-11508
[ticket/11508] The question mark is expected even if there are no parameters.

PHPBB3-11508