unit: Consolidate disjointed unitOption sections in unit.Serialize

can you just use a `map[string][]*UnitOption` to group them then iterate and write that map directly?