Handle locking of run/sample in ExperimentInfo.

This way we can use a more general mutex rather than the specific
critical section used in cow_ptr. Also move some calls that access
the object directly to use the accessor methods that should prevent
access to the object while it is being copied.
Refs #7677
Merge branch 'bugfix/7677_segfault_c2e' into develop