Ensure base_url and api_base_url is always set

It's not entirely clear to me why this didn't work the way it was, but
it seemed to cause issues with the root route of the API app. By adding
the middleware to the app that mounts the API we workaround that issue.
Update popit-api dependency
deploy to production - version bump to 0.0.22