Fix database connection leak in tests

Without this, each flask app created in tests will hold
one database connection until all tests are finished. This may result
in test failure if database limits number of concurrent connections.
Implement py.test fixtures for database and flask application

Allows to set up database schema only once per test run, yet providing
clean environment for each test. Also, easier to use and reduces
setup/teardown code duplication in tests.

Reduces test time by ~50%.
Merge pull request #220 from kedder/for-upstream

Improve testing framework
setup.py: Removed Flask-DebugToolbar package from dependencies
tests: Removed outdated comments in test_authentication
@reify decorator added (ported from pyramid)
Simple achievement detection
Model for unlocked achievements
Correct achievement data extraction
Do not fail to repr flight if no id was yet assigned
Unlocking achievements on track upload
Index name for UnlockedAchievement
Stricter database contstraints for UnlockedAchievement
Missing sample igc files added
Missing > added to UnlockedAchievement repr()
Use set for achievement lookup

This should make achievement detection a little bit more optimal
Make sample data directory available to all tests
Do not show acievements after flight upload

Detailed flight analysis might be not available at that moment.
DB schema update for storing achievements
Create notification when achievement is unlocked