Use unique_ptr to simplify deletion.
Fix a few memory leaks in CodeGenRegBank.