base-files: split service related functions off to /lib/functions/service.sh