A bioartificial pancreas to treat type 1 diabetes: optimization of cell survival and function in preclinical and clinical phases