Shapovalov determinant for restricted and quantized restricted enveloping algebras