Change resource extraction to use uint for thread ids.
Add menu tester.
The menu is constructed with the value of the next unit of a resource, not the last unit.
Add tester for resource pair valuation.