Memory device based on ferroelectric capacitor