Some build refactoring and algorithm cleanup

* Added configure-time conditional handling of bsd/linux net-stat handling
  * externalized get_network_state
* Moved #include's to cpp for efficency and interface abstraction
* Made get_network_state use a null-able pointer for use in determining if
  interface exists
* Removed net_state::error in favor of method error codes
* *multiplier -> *scale for clarity
* Made trim a little more efficient.
* Included math.h for round()
* Made unexposed, cpp-file specific methods static (reduction in exported symbols, good practice)
* Added abstract paint_drawing()
astyle wash