Mark more methods of DispatchKeySet as constexpr
Added operator-, DispatchKeySet::add, and DispatchKeySet::remove.
I wanted to use these in functorch to make a constexpr DispatchKeySet.
Also adds C10_NODISCARD to DispatchKeySet::remove to make it
consistent with DispatchKeySet::add (this will raise a
warning if someone calls remove without assigning the result to a
variable; remove is NOT mutable and this is a pitfall that I run into a
lot)
Test Plan:
- wait for tests
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78558
Approved by: https://github.com/bdhirsh