Refs #9175. Solved the issue by adding copyFrom().

The reported problem is caused by calling parent's copyFrom(), which
does not set m_hasInstrument right. An override on this method solved
the issue.

Use a method to check the status whether mask workspace has instrument
to enhance the robustness.
Made copyFrom virtual. Refs #9175.
Fixed unit test due to change of behavior of exception. Refs #9175.
Cleaned the codes. Refs #9175.
Merge branch 'bugfix/9175_binary_mask_exception' into develop