Risk Bounds for Learning via Hilbert Coresets