Currently, the rosbag_write_integration_test is flaky.
Valgrind and the debugger both suggest that cleanup of shared_ptr<SerializedBagMessage> does not work properly. However, the code never calls reset explicitly, nor is the memory in question released in any other way we can see.