Configure logging on app before returning it

We also need same logging across multiple app, configure logging before
returning the app from factory.

Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
add return statement to return app from the factory
Can't use current_app here, instead print to sys.stderr
Remove old jsonrpc reference file
for package path use __path__

pep8 throws an error but this is run time variable, need to find to make
flake8 ignore this error.
Mount JSON-RPC at /api url_prefix

Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>