Allocating Scarce Resources in Halacha