Merge pull request #1976 from jimis/3.6.x

3.6.0 Changelog
Switch to custom byte swapping function.

GCC builtins like __bswap_32 are not portable between versions.
(cherry picked from commit da0c7b14a80baf63666c86254b47ea2b999db5e8)
Add htole32 replacement and proper header detection of endian.h.

(cherry picked from commit 1c525b40ec315897fb55fbcc3bf782aaa6276f07)
Typo-fixes and a rephrase in HACKING.md

s/absued/abused/
s/indenpendent/independent/
Rewrote garbled line about keeping log messages atomic.

(cherry picked from commit 65044bd284dcf863692198276db0ffcb3711df49)
Add xasprintf() to the suggested alternatives, it can replace the malloc()+sprintf() idiom.

(cherry picked from commit c7fcb08ae423c4e8c3022c84e2580e61ab1e0473)
Redmine 6225: Disable examples checking on non-Linux platforms.

(cherry picked from commit 9157bd8cf063058811cd3f8fd8a5c8900732b764)
Correct copy-paste error in README.

(cherry picked from commit d4f16c6abbb7c2a07eea51e6c04b98a16cda4af4)
Add clarifying comment to endif.

(cherry picked from commit 03bde26c777f07532c05fcabb38516be15dbbc8c)
Try to log TLS errors that are easier to consume.

(cherry picked from commit 488e48b2c8648937e5d144917d4336775d97f7ed)
Do not exit cf-serverd on SIGPIPE and SIGHUP.

(cherry picked from commit 6e918b27886c05b07aaa0eefb9d50493ccd05737)