Core: Fix writing of log lines a single fprintf call

* fb4c208c33788068bbca67bdd6d11127b5be5a26 broke cygwin compilation due to __GCC__ not being defined
* The actual issue is that __GNUC__ rather than __GCC__ should have been used all along
* Also fixes gettimeofday() usage for MinGW/Cygwin
* Also increase log buffer size to 1K, fix a broken fprintf in core.c and sort whitespaces
Core: Use fputs(3) instead of fprintf(3)

This is a micro-optimisation, but it should make the code easier to understand.