Merged freeMemory() into memory().

Instead of having separate functions to get total and free system
memory, this patch merge the two in memory().
memory() now returns a struct containing both stats.

Review: https://reviews.apache.org/r/16769
Updated slave to use new memory struct.

From #16769, memory() now returns both total _and_ free system memory.
This patch adjusts for the new return type.

Review: https://reviews.apache.org/r/16771