remove util.OptionalBool and related functions (#29513)
and migrate affected code
_last refactoring bits to replace **util.OptionalBool** with
**optional.Option[bool]**_
(cherry picked from commit a3f05d0d98408bb47333b19f505b21afcefa9e7c)
Conflicts:
services/repository/branch.go
trivial context conflict
authored by