Adding new feature of core PID loop logging

This differs from the normal logging,
as this focuses on the core of the PID loop computations.

All variables within the core pid/ec/pid.cpp pid()
function are now logged, so math can be debugged.

Output is throttled to only log a new line
when it changes, or when 60 seconds have elapsed.

Creates 2 files for each PID loop,
one showing coefficients that were configured for it,
and one showing the variables changing over time.

Enable by --corelogging command line option,
or by creating /etc/thermal.d/corelogging file.

Tested:
Log files appear as expected, when enabled.
No changes noticed, when this feature is disabled.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I3f37fe918e7cbc6fb885ffa2f268600d5a317d32
diff --git a/pid/tuning.cpp b/pid/tuning.cpp
index 38fa07b..ca18823 100644
--- a/pid/tuning.cpp
+++ b/pid/tuning.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include "tuning.hpp"
+
 #include <string>
 
 bool tuningEnabled = false;
@@ -22,3 +24,5 @@
 bool loggingEnabled = false;
 
 bool debugEnabled = false;
+
+bool coreLoggingEnabled = false;