bool(obj) in Python has the following semantics:
1. if the object has __bool__() method, return its value
2. if the object has __len__() method, return its value
3. return True
So for objects in QGIS API that implement __len__() method, we were getting
unexpected behavior - for example, "if layer: ..." would evaluate as False
in case the layer was empty, while the usual expectation is that any reference
to an object that is not None should evaluate to True.
This method allows to determine if a feature source has content or not
(or maybe).
This method works for "generator" sources as well as for "collection"
sources.
Collection sources like QgsVectorDataProvider which allow to easily and
in a cheap way determine if features are available can return
FeaturesAvailable or NoFeaturesAvailable, generators will return
FeaturesMaybeAvailable.
QgsVectorDataProvider also implements an empty() method.