Move all warn logic for overwriting registration to OperatorEntry (#35769)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35769
This fixes a bug where correct end user API usage can still trigger
a warning because we don't preserve the invariants DispatchTable
was previously expecting to be done. So now, OperatorEntry is
the source of truth, and it just whacks DispatchTable until its
the correct state. OperatorEntry does the user-facing checking.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Differential Revision: D20772383
Pulled By: ezyang
fbshipit-source-id: 167d249a826d7b02361ba0a44571813c829649c1