Add support for Allocate by Priority for generated C code.
This function distributes a limited quantity across multiple demands based on priority order. Higher-priority demands are satisfied first, and any remaining quantity is allocated to lower-priority demands.
Note: I have started working on this feature. Will raise a PR for it in a couple of weeks. I am only planning on adding support for C initially, but can work on the JS portion slowly too.