updated ref to merged branch in PyBossa/pybossa-default-theme
Merge pull request #718 from PyBossa/update-pybosa-default-theme

updated ref to merged branch in PyBossa/pybossa-default-theme
Use last version of redis cookbook
fixed typo
check if long_description is not None and length > 0
use a DB UPDATE command which cannot break from special characters
Merge branch 'master' into markdown-migration-script
Merge pull request #719 from PyBossa/markdown-migration-script

Handle non existing description and escaping in markdown migration script
Full refactor for using Flask Factories in PyBossa

This is the first big commit doing a big refactor for using Flask Factories.

Basically, every module like Sentinel, Signer, etc. are loaded as classes in
the module pybossa.extensions following the Flask pattern of extensions.

This allows us to load the objects in pybossa.core and configure it lately
whenever we want, allowing us to have more flexibility.

Additionally this commit simplifies a lot pybossa.web as we have now a very
clean run.py file that runs a PyBossa server.

Finally, all the tests are going to be refactor to address the new factory
setup.

This issue will have more commits as there is work to be done on upgrading the
tests.
Use the new factories for testing
Use the new sentinel object
Import sentinel properly
Rebuild db
Refactor
Rollback db session when an exception occurs
Rollback session only for SQLAlchemy exceptions.
Refactor tests
Refactor tests.

NOTE: this commit has refactor also the way we interact with the db object, as
Flask-SQLAlchemy closes the session after a request has been done, so if you
use something like app = db.session.query(App).first and you do after that
a proper Flask request, the object will not be bound to the session anymore.
Refactor
Refactor