On constrained smoothing and out-of-range prediction using P-splines: A conic optimization approach