Theory of Fermi Level Pinning of High-k Dielectrics