Calibration by Distribution Matching: Trainable Kernel Calibration Metrics