refine the extension initializer.

- the `self.app` should not be usable under the app factory usage. The
  context-based `current_app` should be used instead of it.
- the `setdefault` method of `dict` has return value.
add the `__all__` to `_compat.py`.

the `__all__` declares the public interfaces and suppress the warning from
the lint utilities.
Merge pull request #7 from tonyseek/source-refine

Refine Source in Unimportant Aspect