Depletion and depolarizing effects in ferroelectric thin films and their manifestations in switching and fatigue