Python 3 support

Please note that dependencies update will break backwards compatibility with Flask < 0.10 and Python2 due to python3-openid dependency, so don't merge into master without considering update/release approach.