unit_shield_link.lua: some tiny cleanup to make it a bit readable.
No logic changes is intended, just renamed functions and encapsulate some stuff.