Introduce safer type castings for cb_handle_t

There is a lot of to-from cb_handle_t type castings, move it into
one place.

Bug: 141385612
Test: build
Change-Id: Iee7194eee513ef531b67cebf3dd8ed98c3face02
Signed-off-by: Roman Kiryanov <rkir@google.com>
5 files changed