move app assignment form __init__ to init_app

It's need less code to initialize database with application configuration later.