Registers extensions.

def register(self, extensions):
        """Registers extensions."""
        for ext in reversed(extensions):
            for name in ext.names:
                try:
                    self._extensions[name].appendleft(ext)
                except KeyError:
                    self._extensions[name] = deque([ext])