Conditionally compile QNX/NTO code in File::Spec::Unix::canonpath()

File::Spec::Unix::canonpath() does a platform run-time check at each
invocation to apply a QNX/NTO hack. As this is not needed on plain Unix
systems, the check can be moved to a constant so that the special code
can be optimized away by constant folded.

This seems to yield a 25% speedup for each call to canonpath().
Fix a comment in File::Spec::Unix::canonpath()

The code was not doing what the comment was describing, and I believe the
code is right here ('/../xx' should be turned into '/xx' and not into 'xx').
Merge two substitutions in one in File::Spec::Unix::canonpath()

Now that the comment was corrected, it is obvious that the two
substitutions can be merged.

I suspect that that '$' is wrong and should be a '\z' but, knowing
File::Spec, I'm pretty sure someone somewhere relies on this.
Simplify the third regexp of File::Spec::Unix::canonpath()

At the second regexp, any path looking like './././xx' gets turned into
'./xx', so there is no need to look for several './' at the beginning of
the path anymore. This means that '(?:\./)+' can be simplified into '\./'.

This also makes it more clear why '././' is not turned into the empty
string by the third regexp even though it is not equal to './'.

Also remove the /s flag, as there is no '.' (sic) in the regexp.
Document and test a couple of edge cases of File::Spec::Unix::canonpath()
Properly align comments in File::Spec::Unix::canonpath()

Whitespace-only change.
Optimize File::Spec::Epoc::canonpath()

Since File::Spec::Epoc::canonpath() looks a lot like
File::Spec::Unix::canonpath(), it is easy to apply to the former the
optimizations devised for the latter.

The tests differing between File::Spec::Unix::canonpath() and
File::Spec::Epoc::canonpath() are also enabled by this commit, so that
it is easy to catch a behaviour change in the future.
Optimize File::Spec::Cygwin::{canonpath,catdir}()

Profiling shows that the hot spot in File::Spec::Cygwin::canonpath()
is the return line, even in exclusive terms. Since SUPER is slow and
File::Spec::Cygwin::canonpath() is explicitely documented as calling
its ::Unix ancestor, we can state explicitely which method we should
recall into.

One would expect this to have little impact, but it yields an average
20% speedup on top of the previous optimizations brought to
File::Spec::Unix::canonpath().
Test some edge cases of File::Spec::Unix::catfile()

They are related to RT #113898.
File::Spec::Unix->catfile should preserve leading dots

catfile() used to call canonpath() twice : one on the file part (its last
argument) and one on the concatenated path. But canonpath() strips any
leading dots, making it impossible to explicitely prepend a dot to indicate
the current directory. For example, this is required when you want to pass
the relative path to an executable to system().

Starting from this commit, catfile() joins all segments with a slash and
removes repeated slashes or unneeded /././ inside the resulting path.
Unfortunately, the easiest way to achieve this is to inline two
substitutions from canonpath(). On the other hand, the new catfile() is
at least 60% faster than the old one.

This fixes rt.perl.org #113898.
Add more tests for File::Spec::Unix->catfile