Fix _ensure_application()

Previously, the first time _ensure_application() was called, if
the mido-api was down then the self.app.get() request would fail
with a socket error. The next time _ensure_application() was
called, self.app is already set so it does nothing. Instead after
_ensure_application passes the subsequent request will
fail because self.dto is still empty.
This commit just resets self.app to None if get() fails.
Note:
_ensure_application() wouldn't fail twice in the real world
since the first time (uncaught socket error) would crash the
plugin, however in the debugger the previous behaviour
was very confusing since the error would shift somewhere
else after the first call.