create type-safe bitfield for sc insert/delete flags

The most important part of the change is in sc/inc/global.hxx

It creates a type-safe struct that prevents the accidental interaction
between regular integer types and the flags struct.
It also provides utility methods that make combining and testing the
flags type-safe.

Change-Id: Ibc5b20058b1655df913490682b679afd1297b36d
Reviewed-on: https://gerrit.libreoffice.org/11071
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>