Move $(EXTRA_DEFINES) from CFLAGS to DEFINES

It's seems more logical to have all the DEFINES subcomponents in the
same place.
Harden gcc build options by default

-D_FORTIFY_SOURCE=2 -fPIE -fstack-protector-all are added along with
hardening linker flags -pie -Wl,-z,relro -Wl,-z,now.

The non-hardening linker optimisations -Wl,-O1 -Wl,--sort-common
are also added.

For clarity purpises, the gcc section is moved to the top.
removing some warnings

+ Non-author changes to origial patch:

  * Surrounding trailing whitespace cleaned up.
Minor typo in log message
Clean certain files of trailing whitespace

I'm only going for the low-hanging fruit here, ie the files
with the fewest lines in need of attention. The more heavily
affected files deserve separate commits.

A surplus line was deleted from both atom.c and chunk.c

In socks.c a 'no newline at end of file' was also fixed.
Expand tilde before open log file.