Numeric IDs refactor in AnsibleModule

Further to #2753 - this is a bit more of a refactor.

There are various reasons a UID might not match what `getpwuid()` returns, the main one for me is operating on files which are in a chroot which has its own passwd file. I think that switching to UIDs as soon as possible and dealing with them internally to the code makes sense.

I've also slightly reordered `set_group_if_different` so that even in safe mode, if a group name which is given doesn't exist it will report an error. Previously `set_owner_if_different` did this, but `set_group_if_different` did not.

I've added UID and GID to the dictionary returned by `add_path_info`, too.