Coupled deformation-diffusion-fracture theories for solids : application to polymeric gels and hydrogen embrittlement in steels