Flask: class-based configuration

@komarserjio hello!

I wasn't able to run flask-notejam because of several issues, and I can't be 100% sure this commit doesn't break anything. If you could run it yourself it would be really great. If everything will be alright please tell me what OS and Python version you were using. Either I did something wrong or flask-notejam needs serious update.

Cheers.