Introduce proper way of dealing with non-POSIX-compatible function declarations

See the documentation in m4/cf3_check_proper_func.m4:

In case system-provided function is not good enough for us, we can have a
replacement, which will shadow the original one.
Fix mkdtemp(3) on Windows