a) for as long as [something happens] =
for a duration that is the same as the duration of another action/state e.g. you both shall live
This applies to your 1.
b) as/so long as = if (no "for") You can choose "as" or "so"
You can see that you can replace "as/so long as" in 2 and 3 with "if" and the sentences have the same meaning.
"as/so long as" sometimes has a more specific sense of "if - during a period". For example, let's change 2 to ".... as long as you continue to swear loyalty to me". So here, the swearing of loyalty is not a single action but something that starts, continues and can stop in the future. The consequence (grant of freedom) applies only during the period that the condition is satisfied.