In a very weird situation, our declaration of `shutdown()` shadows a
function `shutdown(int, int)` from sys/socket, which _just happens_ to
be called by libxcb when closing the sdl window. This calls
`main_clean_exit` which calls into micropython and causes at best an
uncaught NLR and at worst an outright segfault because by that time the
micropython environment doesn't exist anymore.
I didn't think this sort of thing would be possible but here we are??
Fixed by removing `__shutdown()` and replacing `shutdown` with
`trezor_shutdown`
Features `micropython` and `protobuf` are defined. Protobuf implies micropython
because our protobuf impl is pretty much _for_ micropython.
The respective subdirs are included only if the matching feature is defined.
util.rs is moved to micropython because it mostly concerns micropython interop
ResultExt, useful only for ui_debug, is moved to ui::util.
A new module `trezorhal::time` is provided. It mirrors functionality of
`micropython::time` via stmlib functions. The intended use is to always use
functions from `trezorhal::time`. The right micropython variants are used when
micropython is available, otherwise the pure stmlib versions are called.
ui::*::layout is conditional for micropython feature, because it only concerns
micropython layouts. If we want to reuse layouts defined there, we will need to
export them to not depend on Objs and Qstrs etc.