The second round of talks on a permanent agreement over Iran’s nuclear program ended on Wednesday with optimistic statements made by all sides.