core/semaphore: Add semaphore_units<>::split() function
core/semaphore: Add semaphore_units<>::split() function

semaphore_units<>::split() allows some semaphore units to be removed
from the current semaphore_units<> object and wrapped in a new one, so
we can incrementally signal a semaphore but maintain RAII protection
against exceptions.

Signed-off-by: Duarte Nunes <a60e8b7496f7715d71354fe4c06dd24017025bf1@scylladb.com>

syuu1228/seastar,syuu1228/seastar,cloudius-systems/seastar,scylladb/seastar,dreamsxin/seastar,dreamsxin/seastar,avikivity/seastar,scylladb/seastar,cloudius-systems/seastar,dreamsxin/seastar,syuu1228/seastar,avikivity/seastar,scylladb/seastar,cloudius-systems/seastar,avikivity/seastar