[#1849] Add os detection support.


Problem description
===================

Python has a bad way of detecting os.

os.name is 'posix' or 'nt'

sys,platform is linux2, aix5, aix6, win32


This branch tries to explore how can we improve os detection.

Changes description
===================

This ticket came so late since I prefer to not abuse os detection but rather go for "capabilities" detection.
Capabilities detection should work fine in production test, but for tests things are a bit more complicated, especially for testing OS compatibility code.

I have added os_family and os_name to process capabilities but I have a few questions.

Since the os detection code is used only in testing, maybe we should not host it in compat (and encourage its usage in production) but move it in empirical.

Not sure if os_familiy and os_name are the right names... and maybe later we will also need something like os_version as an integer to support less and greater comparisons.


How to try and test the changes
===============================

reviewers @alibotean 

Please give your feedback.

Thanks