[PLXCOMP-220] invalid default uid/gid values never override the base (even if the base is blank); extracted default/override attribute handling into a common abstract class

Signed-off-by: Kristian Rosenvold <krosenvold@apache.org>, applied unchanged
PLXCOMP-220: added toString() to SimpleResourceAttributes
PLXCOMP-220: fixed silly mistake in dirMode overriding
PLXCOMP-220: pushed down setDefaultAttributes() and setOverrideAttributes()