Rewrite functional test case and add better SQLAlchemy integration

- Add transaction support to SQLAlchemy tests: roll back all changes
  made on tearDown (both by the test session and the app sessions).

- Add some crude documentation to FunctionalTestCase.

- Make WebTest a hard dependency: this library is for functional tests.
todo