Moved static iterator into a base class.

Due to the lack of sfinae in Arduino's GCC version, other methods are
needed to exclude functionality.