machine property: avoid hardcoded sizes/strings in sysctl, check err codes

Replaced the call to sysctlbyname with sysctl, avoiding string parsing.
 - used two calls in order to get actual string length
 - checked all calls to sysctl, return nil on error
 - checked call to malloc, return nil on error
Merge pull request #11 from CFKevinRef/sysctl-safety

machine property: avoid hardcoded sizes/strings in sysctl, check err codes