Change KeyFactory context args to references.

Where context arguments are not optional and immediately dereferenced,
change them from pointers to references.

Test: Build
Bug: 171846199
Change-Id: Ia0eba5110418d2f4d5f79bff46d61ad32470ee98
14 files changed