fix: metrics bugs in coglet prediction server (#2896)
- Reject empty keys and empty dot-path segments in set_metric to prevent
panics from invalid metric names (e.g. "", "a.", ".b", "a..b")
- Fix integer increment precision loss by extracting native i64/u64 values
instead of converting through f64 first
- Always include metrics object in state snapshots for consistent payloads,
even when no user metrics have been set
- Include user metrics in error and cancellation HTTP responses, not just
predict_time, so callers always get the full metrics picture