lib/app: move stuff from `App::init` to a new function, `App::sepup`

Because of the `app` method is a `once new App`, the result of the `new`
is not stored until the `new` returns.
Therefore, suggests to doing stuff during the construction of App might
invoke something that use `app` as a global symbol, thus causing an
infinite recursions.