The Fourier restriction and Kakeya problems over rings of integers modulo N