[WIP] data structures for resources

This PR introduced some data structure to represent resources.
@monnand What if the resources is not a numeric one, or they cannot be simply added (e.g. port ranges)
How about define the resource as a interface, which should implements something like `Name`, `Add`, `Substract`, etc.