[identity] general cleanup
Summary: i noticed some incorrect patterns in our code using cargo clippy. in particular, we should use ok_or_else instead of ok_or when we're calling a function (lazy evaluation), avoid referencing when the compiler will immediately dereference anyway, and use Box to wrap large enum variants.
Test Plan: cargo build
Reviewers: jon, bartek
Reviewed By: bartek
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8824