Molecular dynamics study of the influence of functionalization on the elastic properties of single and multiwall carbon nanotubes