Fix valgrind reported errors and add error handling.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Optimization using RAPL

First use the RAPL to set the limits and then use P state control
using Intel p state driver or MSRs.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Version 0.6

Main changes are:
- Use Intel P state driver to control P states
- Use RAPL cooling device
- Fix valgrind reported errors and cleanup
- Add document

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>