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: I16fbf16c50ae9758763dd747cca599a803419f9f
Signed-off-by: Roman Kiryanov <rkir@google.com>
5 files changed