North Carolina Republican lawmakers voted to strip the state’s incoming Democratic governor and attorney general of key powers.