Fix deletion of operations through the rewriter in a pattern matching a consumer operation
This allows for the conversion to match A(B()) -> C() with a pattern matching
A and marking B for deletion.
Also add better assertions when an operation is erased while still having uses.
Differential Revision: https://reviews.llvm.org/D99442