Parametric X-ray radiation in the Smith-Purcell geometry for non-destructive beam diagnostics