Cleanup: Add an empty() method to RNA's CollectionRef class
The existing RNA CollectionRef class only offers a length() operation which is sometimes used for checking if the collection is empty. This is inefficient for certain collection types which do not have a native length member; the entire list is iterated to find the count.
This patch creates an explicit empty() method to be used in such cases for better semantics. Additionally, many collection types will behave more efficiently when using the new method instead of checking length.
Making use of the new method will follow separately.