Instead of creating some very complex IK solution for this, you could create a compound collider for your character controller. Instead of having just a capsule, add a sphere collider for the head and move it to head position in LateUpdate by script. If the head colliders is a child of the character controller rigidbody and doesn't have a rigidbody of its own, it will work as the character controller's collider. You can do the same with the sword.
Also, check out the "Penetration Avoidance" demo in FIK.