features: bump _XOPEN_SOURCE to 600

This enables support for SUS sixth revision.
Also addd it where it was missed. This cleanups build under lucid.

TODO: Move it to features.h header
TODO: Bump _POSIX_C_SOURCE 200809L
TODO: Bump _XOPEN_SOURCE to 700
TODO: Switch to -std=c99?
history: fixed return value handling
it: python: simplified code