Prepare for 0.3.0 release
Implement factory pattern

There isn't any reason to use this extension in this way but supporting
this API is required for becoming an approved Flask extension.