user: refactor GetUser... and expose private functions

This patch refactors most of GetUserGroupSupplementaryHome and its
signature, to make using it much simpler. The private parsing functions
have also been exposed (parsePasswdFile, parseGroupFile) to allow custom
data source to be used (increasing the versatility of the user/ tools).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
user: use struct values instead of pointers

This patch fixes the incorrect practice of using pointers to struct
values rather than using the struct values themselves when the struct
value memory is not intended to be shared.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
user: add unit tests for GetRunUser

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)