Update Flask integration to most recent version

Recently I found this library and read documentation. But found that real code isn't follow what said in docs. Also I found that Flask-SQLAlchemy API is outdated in examples and updated to most recent versions. Now code should looks more clean and readable.