CAS-14184 : Fix mask handling logic on startup
The mask handling used to be in the frontend, but moved it to the
backend. It now correctly accounts for a restarted state with a
previously active mask.
The logic is :
- Initial launch : If usemask='user' and mask = '' then make sure the
default mask is filled with zeros before the GUI is launched. Leave mask
untouched for all other cases
- Restart :
- If usemask='user' and mask='' :
- If mask exists on disk - leave untouched
- If mask does not exist, make sure mask is filled with zeros
- Leave mask untouched for all other cases