Anagrafe, stato civile ed elettorale