core: Add QCOM_LEGACY_UIDS ifdef

 * qcom_oncrpc user is deprecated. We should align with upstream.
 * Define this if you still need the legacy behavior.
 * Also remove extra definition of qcom_diag

Change-Id: I802434899b99b652ed1c1111c983edae052250da