Add the KEY_END marker on key creation where missing

Add the KEY_END vararg where missing when creating a new key, either
using the C keyNew or the C++ kdb::Key, as done everywhere else.

This fixes crashes in some tests.
tests: switch from tmpnam to mkstemp

Use mkstemp to generate a temporary file in a safer way than tmpnam,
and placed in the temporary home created for the tests already.
xmltool: move testmod_xmltool.c to the top-level

No functional changes.
xmltool: change directory of tests data

Move the XML test data from the tests subdirectory to a new xmltool
one, installing it as a whole together with the other test data;
adapt testmod_xmltool and test_validate.sh to the new paths of the
test data.

This mimics how other plugins handle test data.
xmltool: remove now empty tests subdirectory
Merge pull request #45 from pinotree/xmltool-tests

xmltool plugin: fix handling of the test data
Merge pull request #44 from pinotree/tmpnam

tests: switch from tmpnam to mkstemp
Merge pull request #39 from pinotree/va-args

Add the KEY_END marker on key creation where missing
cmake: check and store the size of mode_t
Make KEY_MODE work when mode_t is not the same as int

Even though the file modes passed using KEY_MODE should be mode_t,
they really get through as integer, thus picking them from the varargs
as mode_t causes troubles when sizeof(mode_t) != sizeof(int). Hence,
always take them out as int from the varargs.

Adapt test_meta to test large values for the mode only when
sizeof(mode_t) > 2.