Modeling of Moisture Diffusion and Moisture-Induced Stresses in Semiconductor and MEMS Packages