Lattice dynamics in FeSe via inelastic x-ray scattering and first-principles calculations