Origin of stresses in sputtered elemental and alloy thin films