spacemanager: Make use of lambda expressions and other minor fixes

All identified by IntelliJ.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Karsten Schwank <karsten.schwank@desy.de>
Patch: https://rb.dcache.org/r/7562/