On the death, resignation, removal from office or expiration of term of office of any sheriff, or of any coroner acting as sheriff, the jail must be delivered over to his successor or to the person authorized by law to take charge of it, together with the prisoners therein, the files of commitments and discharges and everything belonging or appertaining to the jail.