Energy use collection logic

Attached is the energy accounting patch that Martin and Yiannis have been working.  The framework is there, but the functionality it currently not working.  They are both on vacation this week and then are back a week before the conference.  I thought it would be better to send in order to get the framework and the structures in place for an official 2.5.0 instead of waiting.  If you disagree, just let us know and we can send it again when the low level functionality working.    Here is a short summary of our test results.

1. jobacct_gather/none + energy_accounting/none

Looks OK.  Did not find any errors.

2.  jobacct_gather/linux or cgroup + energy_accounting/none

Looks OK.  Did not find any errors.

3.  jobacct_gather/linux or cgroup + energy_accounting/rapl

Slurmd aborts when you run a job that uses a node that does not support RAPL.  This appears to be because of the error()/pexit() at line# 150/151 in energy_accounting_rapl.c.  We need to change this code to just issue a debug message and return.  For now, energy_accounting must not be configured if the cluster includes any nodes that do not support RAPL.

The cpu frequency values reported by jobacct_gather are not correct.

Again, there are obviously some problems, so if it would be better to wait for full functionality just let us know.  It may be three weeks before they are able to spend some time on this to fix the problems, so that is why I thought you may prefer to have something that has the correctly data structures in sooner rather than later.
Patches to energy consumption logic

Fix to some un/pack logic
Fix to test12.5 for new sacct help format
Address various compiler warnings
Energy plugin mods

Minor format changes including removing changes from master code base that
are not needed (e.g. blank lines added or removed)
Energy accounting modules, add new modules
energy accounting: Add new modules
Energy plugins: add new web page
Energy accounting patch enhancements

provides the following improvements on the energy accounting framework :
1)the per step average frequency is now calculated correctly and may be reported by sstat and sacct
2)correction on the logic of per step energy consumption calculation through rapl plugin. This value may be also reported through sstat and sacct
3)node power and energy monitoring now working correctly through rapl plugin.
Purely cosmetic modifications for new energy consumption code
For accounting, correct data types in read of /proc
Rename energy_accounting to acct_gather_energy
More rename and move common vars into structure
(removed some unused variables but many remain)
cleanup whitespace
update to newer way to make plugins
remove extra return for the acct_gather_node_msg
The parameters of acct_gather_energy_p_get_data were reversed.
Updates to energy accounting work

The patch contains:
1) general code cleanup
2) documentation concerning the energy framework
3) fix for sstat header/data mismatch problem
4) changes on the rapl plugin to print the average power consumption between 2 measurements
in place of an instantaneous value:  this is printed for CurrentWatts value of "scontrol show node"
5)the memory leak that Moe located on cpu frequency code

we are currently working on the following :
- the requested frequency as described by Martin
- rapl fine grain measurements (socket level)
- the ipmi plugin based on freeipmi

and we hope to have them either during your 2.5.0.rc1 testing period or for the 2.5.1
Merge branch 'energy'

Conflicts:
	configure
	doc/html/documentation.shtml
	src/common/cpu_frequency.c
	src/common/slurm_jobacct_gather.c
	src/common/slurm_protocol_defs.c
	src/common/slurm_protocol_defs.h
	src/plugins/accounting_storage/mysql/as_mysql_job.c
	src/sstat/sstat.c
energy accounting clean up

Remove some unused variables and minor reformatting to conform
with Linux kernel coding standard