Wave propagation and thermodynamic losses in packed-bed thermal reservoirs for energy storage