Re #8358. Clear memory leaks in test.

There's no reason for any of these MaskWorkspace instances to be created
on the heap rather than the stack.
Merge branch 'bugfix/8358_dataobjects_test_memory_leaks' into develop