cgroup_isolator: Allow kernel to handle OOM.

The Mesos userspace OOM handler does not conform to the practical
restrictions imposed upon it given the potential states the kernel can
be in when it gets the OOM notification. The result of this has been
numerous deadlocks because the Mesos OOM handler blocks on a lock that
is being held by the task it is trying to kill.

This patch does not try to fix the issues with the OOM handler. Instead,
it hands over the job of OOM-killing to the kernel. The end result is
very similar. The downside to this approach compared to the approach
it's moving away from is now when the Mesos OOM handler reads the
memory.stats they will be after the oom condition occurred. The "maximum
usage" is still captured but the breakdown is lost. This exposes another
weakness in the memcg implementation regarding page cache awareness.
However, the reliability improvements outweight the weakness in stats.

Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
libprocess: Remove duplicate gethostbyname2_r

On Apple, the gethostbyname2_r function is defined twice. Once in
libprocess/src/pid.cpp and once in stout/os.hpp.

- Remove the unnessecary definition of gethostbyname2_r from pid.cpp.

Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
isolator: Make resourcesChanged() API Present Tense.

- Refactor resourcesChanged() to changeResources(), mirroring the tense
  of other isolator member functions.

Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
isolator: Change recover() to recoverExecutors()

- Refactor recover() to recoverExecutors() to make it easier to
  distinguish between various recover functions during refactoring
  effort.

Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
isolator: Update usage() to getResourceUsage()

- Follow verbNoun convention of isolator API.
- Refactor usage() to be getResourceUsage().

Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
isolator: Push Resource Initialization To Isolator

- Introduce Isolator::getResources()

Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
isolator: convert getResources() to virtual future

- Make getResources() a virtual function returning a future.

Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>