audiohal: Avoid making unneeded calls to HIDL inteface's ::castFrom

Instead of calling '::castFrom' every time a conversion from
IDevice to IPrimaryDevice is needed, make this conversion at
initialization.

This is to avoid additional IPC calls that are required
for 'castFrom'.

Bug: 63142881
Change-Id: Ic4192c729011ce2653772847e83da426116f9e94
Test: audio works
2 files changed