An envoy from Qatar who authorities said grabbed a surreptitious smoke in a jetliner's bathroom and then joked about lighting his shoe on fire was released from custody after sparking a bomb scare and widespread alert that sent jet fighters scrambling to intercept the flight.