Split buckets on boot complete

Also clean up a bit of code on splitting on app upgrades

Piggy-backed off the app upgrade tests, adding parameterized tests to
also test boot complete event.

Refactored some value metric test code to increase code reuse and
assertions.

Fixed a broken value metric test that had assertions commented out.

Refactored NamedLatch into MultiConditionTrigger to avoid creating a
thread before necessary.

Test: atest statsd_test
Test: push a simple test config, reboot, wait, get data. Made sure
the bucket was split
Bug: 144099206
Bug: 154511974

Change-Id: I73858b5db08e8cda762bd8091b30da8738d1fd88
diff --git a/cmds/statsd/src/StatsLogProcessor.h b/cmds/statsd/src/StatsLogProcessor.h
index 97512ed..ffd83ba 100644
--- a/cmds/statsd/src/StatsLogProcessor.h
+++ b/cmds/statsd/src/StatsLogProcessor.h
@@ -120,6 +120,11 @@
     /* Notify all MetricsManagers of uid map snapshots received */
     void onUidMapReceived(const int64_t& eventTimeNs) override;
 
+    /* Notify all metrics managers of boot completed
+     * This will force a bucket split when the boot is finished.
+     */
+    void onStatsdInitCompleted(const int64_t& elapsedTimeNs);
+
     // Reset all configs.
     void resetConfigs();