snapuserd: Factor setpriority/settid calls into a helper.

This allows disabling the code in host builds, since settid() isn't
available in the glibc prebuilt.

Bug: 288273605
Test: snapuserd_test
Change-Id: Ifddb5cb8b04484a1ab0a29794d65c9839759a919
7 files changed