Since the headers for cpu, memory and load functions are virtually the same for
all platforms, I've decided to move them into common/ dir and do some
refacotring:
* removed per-platform header files
* implemented get_cpu_count() function across all platforms. We are using it cpu
on every platform, yet not on every one this was implemented as a separate
function.
* removed platform detection through preprocessor from main: we don't need this
there anymore, since the headers are common for all platforms. CMake will
handle setting of correct source files for us now.
* Unified used defines for CPU states across all platforms and made linux use
them. Added some platform detection to cpu.h in order to set them correctly
across the platforms.
* moved getsysctl.h to common/ dir, since it's used on Net and Free BSD, and
thus become a common include.
* Use std::sting instead of char[] in the graph drawing functions. This is the
only change to the code. Rest is just styling.
* Corrected whole code to follow Allman/GNU coding style, with 2 spaces for each
indentation step.
* Added license headers to all code files
* Added vim modelines to all files. They sit on the first line and enable the
following settings: 2 space indentation, tab expansion to spaces, line at
80th column, automatic line breaking on "\ !@*+-;:,./?" characters, automatic
line break if line exceeds 80 colums. This should keep the code nice and tidy.