Two Iranian men have been charged over a failed bomb attack in Bangkok, which one official says aimed to assassinate Israeli diplomats.