Dump a feature collection's features to a dictionary.

        This does not include additional data, such as whether
        or not the collection is read-only.  The returned dictionary
        is suitable for serialization into JSON, CBOR, or similar
        data formats.

def to_dict(self):
        '''Dump a feature collection's features to a dictionary.

        This does not include additional data, such as whether
        or not the collection is read-only.  The returned dictionary
        is suitable for serialization into JSON, CBOR, or similar
        data formats.

        '''
        def is_non_native_sc(ty, encoded):
            return (ty == 'StringCounter'
                    and not is_native_string_counter(encoded))

        fc = {}
        native = ('StringCounter', 'Unicode')
        for name, feat in self._features.iteritems():
            if name.startswith(self.EPHEMERAL_PREFIX):
                continue
            if not isinstance(name, unicode):
                name = name.decode('utf-8')
            tyname = registry.feature_type_name(name, feat)
            encoded = registry.get(tyname).dumps(feat)

            # This tomfoolery is to support *native untagged* StringCounters.
            if tyname not in native or is_non_native_sc(tyname, encoded):
                encoded = cbor.Tag(cbor_names_to_tags[tyname], encoded)
            fc[name] = encoded
        return fc