Implementation of operator `=` on resource classes. Make sure handling of resource assignment works through control flow and optimization barriers. Depends on: llvm/wg-hlsl#180