Revert "fix uptime calculation for solaris"

This reverts commit 4acdab76b8f8442ba2932922a61fe291e422bd06.
Fix "suggest parentheses" warning.
Added missing include, Solaris was failing compilation.
Test for isfinite().

Fixes compilation on Solaris 9.
Mark setenv() as deprecated, putenv() is a more portable alternative.
Fix Solaris missing definition.
Always include platform.h first in tests, by always including test.h first.
Removed shady piece of code that caused linking error on Solaris 9.
Fix warning about signed char array subscript on Solaris.
Fix warnings on Solaris by including platform.h first.
file_writer_test was refactored.

The reason is that previously we were redefining libc's fwrite() to
change the output location of WriterWrite(). However, on Solaris 9
fwrite() is also used in our printf() replacement which is called for
other reasons in the tests, so random crashes/behaviour was happening.

The test is now including the writer.c source file directly, which
overrides fwrite() only if #ifdef CFENGINE_TEST.
On Solaris uptime was wrong, fix it to read the proper kstat statistic.
Added two ways to compute uptime on UNIX.

Tested on Linux and Solaris 9.
Fix dependencies for sysinfo_test.
Print uptime in sysinfo_test so that it can be verified visually.
Prioritize uptime alternatives in headers, not in implementation.

Also simplified the logic a bit, since libpcre is now a hard dependency,
so we can always parse the "uptime" command output thus uptime
calculation will never fail.
Solaris 10 kstat gives absurd boot_time.
Merge pull request #1803 from jimis/portability_part2

Portability part2