Add resource fit predicates.
Merge pull request #1474 from brendandburns/resource

Add a resource fit predicate.