Add `TO_HAL()` and `TO_LOG()` macros
with these defines it is possible to cast an `abstract_singleton` pointer
to the correct instance.