The `ProcsTotal` in the `MiscStat` structure was very inaccurate. It was reading
a value which is the total number of kernel scheduling entities. This includes
both processes and threads significantly overcounting.
This instead uses an existing method already in common to count the number of
processes via the /proc filesystem where any directory is a number. This should
still be a single syscall to read that directory entry.
This fixes#1606.
Package common wasn't used for public functions. Place it in an
internal directory to prevent other packages from using.
Remove the distributed references to "HOST_PROC" and "HOST_SYS"
consts and combine into a common function. This also helps so that
if a env var is defined with a trailing slash all will continue to
work as expected.
Fixes#100
Added the ability to fetch an alternative location for /proc via an
environment variable. If the env var is not set it will return /proc as
the default value.