Replace strndup calls by strdup in makesgml

Even if it is part of the standard, strndup is not present in Solaris
10, leading to errors when trying to compile makesgml on this platform.
Knowing that Solaris 10 is supported until 2021, making the existing
code more portable makes sense thinking that it could still be used
for many years.

Backpatched down to 1.0 to allow even older versions of XC to work on
this platform as it looks to be worth the move. Note that strndup is
never used in vanilla Postgres code, so having it present looks like
an error by the way, without really being a bug in itself.

At the same time this commit fixes some whitespaces found while coding.