Companies often need to reduce the size of their workforce. But how do managers decide which employees to let go and which to keep?