That is not a State Based Action; it is a State Triggered Ability, so it goes on the stack, and you have a chance to respond before it resolves. However, the ability will still be there after you respond, so you still lose the game. Rule 603.1 defines triggered abilities:
Triggered abilities have a trigger condition and an effect. They are written as “[Trigger condition], [effect],” and begin with the word “when,” “whenever,” or “at.” They can also be expressed as “[When/Whenever/At] [trigger event], [effect].”
The ability on Immortal Coil says
When there are no cards in your graveyard, you lose the game.
so it matches that description.
Rule 603.8 describes state triggered ablities:
Some triggered abilities trigger when a game state (such as a player controlling no permanents of a particular card type) is true, rather than triggering when an event occurs. These abilities trigger as soon as the game state matches the condition. They’ll go onto the stack at the next available opportunity. These are called state triggers. (Note that state triggers aren’t the same as state-based actions.) A state-triggered ability doesn’t trigger again until the ability has resolved, has been countered, or has otherwise left the stack. Then, if the object with the ability is still in the same zone and the game state still matches its trigger condition, the ability will trigger again.
Once the Immortal Coil is on the battlefield, as soon as your graveyard is empty, the ability will trigger. At that point, giving it away with Bazaar Trader won't help, because the ability will still be on the stack, and you will still lose when it resolves.