Fix race condition in getting the current decimal separator.

The code to get the current decimal separator was not thread-safe. If two
threads concurrently saw that the locale had changed, they might both try
to free() the same string.

This isn't a perfect fix, there's still a race condition if a thread changes
the locale while another thread is running the psqlodbc code. But at least
this eliminates the race condition when the locale was changed earlier, not
concurrently, and even if it is changed concurrently, this is less likely
to crash, depending on the way localeconv() is implemented in libc.
Silence compiler warnings about unused variables.
Fix bug in building an abbreviated connection string.

Introduced by the keepalive-patch, which accidentally removed a line from
sprintf format string. Caught by a compiler warning.
Remove unused function.

Silences a compiler warning.
Remove unused or bogus PG_TYPE macros.

Some of these allegedly built-in types didn't exist in PostgreSQL source code
(maybe they did in some ancient version?), some were just unused in
psqlodbc code.
Minor cleanup.
Add a test case for data type conversions for results coming from server
Fix buffer overflow in SQLGetData.

If a PostgreSQL timestamp column is fetched using SQLGetData, into a
SQL_C_CHAR output variable, with size of 20-22 bytes, the driver might
overrun the buffer by a few bytes with unusual timestamp values, with
year < 0 or > 10000.

While at it, fix the truncation behavior for date/time/timestamp values
so that if the output buffer is too small, we still write what fits and
truncate, instead of writing nothing. This is something that one might
do on purpose, e.g. if you only want to fetch the year part of a date,
you might call SQLGetData() on a date column, with only 4 bytes long
output buffer. (although we haven't heard any complaints from the field).

Also, if the output buffer is of type SQL_C_WCHAR, but the buffer length
is odd, and we have to truncate, we didn't NULL-terminate the string.
Using an odd-sized buffer with SQL_C_WCHAR is a pretty unlikely thing to
do, but nevertheless I think this is more correct behavior.

Add test cases for the bugs fixed.
Remove the code to register XADLL from pgenlist(a) and register the
dll on installation.