Add a database table for node compliance
The table should contain compliance by node run.
The table is meant to store the nodeid, the run timestamp, the run expiration time (i.e until when the data is OK given the corresponding node configuration), the node configuration use to get that compliance (actually, perhaps even the full run analysis) and the compliance data.
We want to have two compliance data types: a sum-up that only contains node compliance (top level), and the full detauls down to value and messages, in JSON.
The node compliance (top-level) can also be json, it will accomodate extension in future, and even JSON queries at some point.
For now, we don't really need to use the table, just correctly populate it for future use and (today) debuggin/forensic.
Note: we are using compliance from two point in Rudder: Node and Rule. In the proposed scheme, we only take care of compliance by Node. The reason is that in the future, as soon as we can require PG 9.3, we will have access to JSON queries, and so we will be able to use them to get info by rule. That would also allow to get information by anything, not just rule and particulary by directives. And as said, for now we are just populating the table.
The correct place to update data seems to be when we receive new run, when compliance is calculated to populate the compliance cache.