Merge "Thread-safe pipe teardown during restore operations" into nyc-mr1-dev