Allow using apphook_pool.register() as a decorator.

If it returns None, then the value of the defined class will be None,
which makes it dfficult to access the class!

It can still be used in the old way. The lambda is only necessary when
register is invoked with arguments, for example:

    @apphook_pool.register(discovering_apps=True)
    class MyApp(CMSApp): ...

and I don't know if that should be allowed or not.