Merge "Move to smart pointers for refcounting RS contexts"