Efficient state retention in transiently powered computing systems