Universal Online Temporal Calibration for Optimization-based Visual-Inertial Navigation Systems