Whenever the jail in any county has been declared a workhouse, as provided in § 41-2-102, the sheriff shall be ex officio the superintendent of the workhouse. All persons liable to imprisonment for safekeeping, whether charged with felonies or misdemeanors, shall be confined in the workhouse, securely kept and properly cared for.