Jwang add resource measurements

Actually, this does not really make sense to be inside of the heartbeat reporter. The heartbeat tells the server only that it is alive, and should be as short as possible. For example: What happens if resource collection takes longer than heartbeat interval? Won't the server miss the heartbeat? In general, we want sensible isolation of functionalities and descriptive names -- in other words, this code should really be in its own task.

In