qcacld-3.0: Introduce hdd_handle_to_context()

Currently direct typecasting is used to convert an HDD handle to HDD
context. Typecasting has the disadvantage that it does not allow the
compiler to validate that the input item being typecast really is an
hdd_handle_t. In order to allow the compiler to typecheck the input
item introduce a converter API, and update the current existing
typecasts to use the converter.

Change-Id: Ifc7c3e062af234b378f1fb806cae0814ac52e423
CRs-Fixed: 2273915
3 files changed