Convert PolicyRegistrationTest from groovy to java
Adds policy added/removed sensors
return json primitives not strings, for sensor values:
for doubles when displaying, round to thousands place
use JSON array for datatables in sensor, activity, and config,
so we have more control about when/how they update,
esp for adding tasks dynamically (fnAddRow with DOM is incompatible with filtering);
table prettification, and additional (and a bit more standardised) toolbar for the table
fix code review comments, including mysql and rounding; and jasmine tests (they needed config.txt update);
policy config now shows the new style (though it still doesn't yet use json arrays);
also fix policy tab so it shows immediately,
and fix tab-switch error when we've reloaded a page
Merge pull request #548 from aledsage/feature/track-policies

Feature: track policies
Merge pull request #572 from ahgittin/misc

datatables using js arrays instead of dom, standardising and improving datatables loog and feel
Fix PolicyRegistrationTest.testRemoveAllPolicies
Merge pull request #583 from aledsage/fix/PolicyRegistrationTest

Fix PolicyRegistrationTest.testRemoveAllPolicies