Thermoelastic damping in micro- and nanomechanical beam resonators considering size effects