[python-3.7-fix]: Allow compilation with Python 3.7
PyOS_AfterFork() is deprecated in favour of the new functions
PyOS_BeforeFork(), PyOS_AfterFork_Parent() and
PyOS_AfterFork_Child(). (Contributed by Antoine Pitrou in bpo-16500.)
Since the -Werror=deprecated-declarations flag is on, the fact that
PyOS_AfterFork is deprecated now results in a warning, and since all
warnings being treated as errors, collectd fails to compile.
This commit detects when we have python 3.7 or newer, and uses the new
replacement function.
Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>