Use portable PRIuMAX/PRIdMAX/PRIoMAX to print [u]intmax_t (Mantis #1677)

Not all standard C libraries support %jd/%ju/%jo (though C99 ones should). Hence
check for macros and use them for the functions which are not C99
compliant. snprintf and derivatives are C99-compliant in CFEngine (in case
standard library does not provide for C99-compliant implementation,
pub/snprintf.c is used instead). Note that blindly using PRIdMAX in all the
cases is not possible, as e.g. on Windows it expands into I64d, which is not
accepted by pub/snprintf.c implementation.

Cherry-picked from: f6ba42d5b2988be1f94ee4e55baa174fd7906362

Conflicts:

	src/client_code.c
	src/files_operators.c
	src/files_select.c
	src/generic_agent.c
	src/logging.c
	src/modes.c
	src/pipes.c
	src/platform.h
	src/processes_select.c
	src/server.c
Merge pull request #335 from awsiv/Solaris8SegfaultFix

Use portable PRIuMAX/PRIdMAX/PRIoMAX to print [u]intmax_t (Mantis #1677)