Do get_hub() before monkey_patch() to workaround issue with
import cycles in eventlet < 0.22.0;
Based on the worked-around in eventlet with patch
b756447bab
Also moved monkey_patch() up as far as possible to make sure all imports
get patched modules.
Closes-Bug: 1746136
Closes-Bug: 1745112
Conceptually cherry-picked from change I72c349e81dfc02136b22637c707ad4908c9f269e
Change-Id: I0ed736f30f8fd7a3ec046e5810b84b52910fa4c9