CAS-14774: set hasSPW(false) when SPW axis is absent in lazy BDF flag path
In processCorrelatorFlags (used when importasdm lazy=True bdfflags=True),
the else-branch of the SPW size check incorrectly called hasSPW(true) when
the announced and calculated flag buffer sizes did not match, meaning the
SPW axis is genuinely absent. This caused traverseALMACorrelatorFlagsAxes
to misread the flags buffer layout and apply fewer flags than the non-lazy
path (processCorrelatorFlagsPerSlices), which already had the correct
hasSPW(false) call.
CAS-14759: Restore pbmask for cube standard gridder via `calcmask`
The previous performance optimization for the cube standard gridder
bypassed normalizeprimarybeam() on the master node to avoid a slow,
sequential plane-by-plane evaluation. However, this inadvertently skipped
the generation of the `mask0` subtable on the `.pb` image, causing the
pbmask to be missing from the dirty map.
This commit restores the mask creation on the master node by using
the `ia.calcmask()` tool. This preserves the majority
performance gain from the previous optimization while correctly restoring
the `pblimit`-based mask for downstream application.
Additional optimizations:
- Mask generation is skipped entirely if `pblimit < 0.0`, aligning with tclean logic
- Cleaned up redundant imports inside the makePB function
- Handled tool lifecycle with an explicit `_ia.done()` for safe memory management