MFC r259330,r259331:

rlimit: add and utilize lim_shared

rlimit: avoid unnecessary copying of rlimits

If refcount is 1 just modify rlimits in place.