Add local_resources
Function to measure locally and set manual options.
Function to measure worker local/foreman global.
Measure just before sending the update to the master
Do not report manual option for disk and memory if less than available.

Disk and memory available to a worker may go under the manual option as
the worker shares resources with other processes. This commit makes the
worker conservative, by reporting the minimum between the total
available and the manual option.
Merge pull request #400 from btovar/separate_local_global

Refactoring of code related to the measurement of local and aggregate resources at the foreman.
1. Separate the measurement of local resources from the aggregates at the foreman.
2. Fold the measurement of resources into the function that transmits the resource updates to master.