Structure and mechanical properties of silica aerogels and xerogels modeled by molecular dynamics simulation