Jamming, glass transition, and entropy in monodisperse and polydisperse hard-sphere packings